Skip to content

Commit

Permalink
build: set up separate publish jobs (#1887)
Browse files Browse the repository at this point in the history
  • Loading branch information
theetrain committed Jan 12, 2024
1 parent 3bd943d commit f1cafd4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,22 @@ jobs:
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- name: Publish package
- name: Build
run: |
npm install --force
npm run build:docs & npm run build:lib
- name: Publish package (stable)
if: ${{ ! contains(github.ref, '-next') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Currently, only npm supports publishing packages with provenance
# https://docs.npmjs.com/generating-provenance-statements
run: |
npm install --force
npm run build:docs & npm run build:lib
npm publish --provenance --access public
- name: Publish package (next)
if: ${{ contains(github.ref, '-next') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
npm publish --provenance --access public --tag next

0 comments on commit f1cafd4

Please sign in to comment.