Skip to content

Commit 704aa14

Browse files
committed
Add CI release workflow
Add release.yml workflow triggered on GitHub release publication. It runs npm ci and npm publish with --provenance (SLSA provenance attestation) and --access public (required for @ably/ scoped packages). Uses the NPM_TOKEN repository secret for authentication via setup-node's registry-url configuration.
1 parent 31342c1 commit 704aa14

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release packages
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: 'write'
12+
id-token: 'write'
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: true
17+
- uses: actions/setup-node@v6
18+
with:
19+
node-version: '24'
20+
registry-url: 'https://registry.npmjs.org'
21+
- name: Install dependencies and publish
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
run: |
25+
npm ci
26+
npm publish --provenance --access public

0 commit comments

Comments
 (0)