Skip to content

Commit

Permalink
fix(action): release workflow with npm_token
Browse files Browse the repository at this point in the history
  • Loading branch information
kyechan99 committed Mar 11, 2024
1 parent 55cb90c commit 982a761
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,27 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install pnpm
run: |
npm install -g pnpm
- name: Checkout
uses: actions/checkout@v4

- name: Install Packages
run: pnpm install
- run: pnpm testOnce
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: https://npm.pkg.github.com/
- name: Install pnpm
run: |
npm install -g pnpm
- name: Install Packages
node-version-file: '.nvmrc'
cache: pnpm
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: pnpm install
- run: pnpm publish

- name: Publish 🚀
shell: bash
run: pnpm publish packages/components --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 982a761

Please sign in to comment.