Skip to content

Commit 8058f7b

Browse files
committed
Add CI build verification and release workflow
Add a dedicated build job to the CI workflow that verifies the Vite build succeeds on every push to main and PR. This runs in parallel with the existing check job. Add release.yml workflow triggered on GitHub release publication. It runs npm ci, npm run build, 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 d857b36 commit 8058f7b

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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@v4
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 run build
27+
npm publish --provenance --access public

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ jobs:
3131
- run: npm run check:error-codes
3232
- run: npm test
3333
- run: npm run test:integration
34+
35+
build:
36+
name: Build
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
with:
41+
submodules: true
42+
43+
- uses: actions/setup-node@v6
44+
with:
45+
node-version: 24.x
46+
cache: npm
47+
48+
- run: npm ci
49+
- run: npm run build

0 commit comments

Comments
 (0)