Skip to content

Commit

Permalink
add publish.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zeevo committed May 15, 2024
1 parent c3ed89c commit 975b2e0
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
name: Publish Package to npmjs
name: Node.js Package

on:
release:
types: [published]
types: [created]

jobs:
build:
publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
node-version: v20.x
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: pnpm run build
- run: pnpm publish --provenance --access public
- run: pnpm build
- run: pnpm changeset:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 975b2e0

Please sign in to comment.