Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JoltCode authored Feb 6, 2024
1 parent 772de42 commit 9d1d600
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,33 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v4

- name: Publish to npmjs.org
uses: ./[email protected]
- uses: pnpm/action-setup@v2
with:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
version: 8

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"

- name: Install dependencies
working-directory: .
run: CI=true pnpm install

- name: Run build
working-directory: .
run: pnpm build

- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish
working-directory: .
run: pnpm publish --access=public

0 comments on commit 9d1d600

Please sign in to comment.