Skip to content

Commit b2579c9

Browse files
committed
CI: Automate npm publish, including package provenance
The dry-run flag is for initial testing
1 parent a322377 commit b2579c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,14 @@ jobs:
7272
populate-and-publish-npm-workspace:
7373
permissions:
7474
contents: write
75+
id-token: write
7576
needs: build
7677
runs-on: ubuntu-24.04
7778
steps:
79+
- name: Install Node.js
80+
uses: actions/setup-node@v4
81+
with:
82+
node-version: '24'
7883
- name: Checkout
7984
uses: actions/checkout@v4
8085
- name: Download build artifacts
@@ -93,3 +98,6 @@ jobs:
9398
artifactContentType: application/x-xz
9499
prerelease: ${{ contains(github.ref, '-rc') }}
95100
makeLatest: ${{ !contains(github.ref, '-rc') }}
101+
- name: Publish npm packages
102+
if: startsWith(github.ref, 'refs/tags/v')
103+
run: cd npm && npm publish --workspaces --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }} --dry-run

0 commit comments

Comments
 (0)