Skip to content

Commit 6b5dcd7

Browse files
authored
fix(ci): publishing doesn't work (#570)
GitHub and NPM recently introduced tighter security on the publishing process for NPM packages. More info can be found here: https://github.blog/changelog/2025-09-29-strengthening-npm-security-important-changes-to-authentication-and-token-management/ To use trusted publishing without tokens, we have to slightly change the publishing config. Most notably we had to upgrade semantic-release since it only supports from version 25 the trusted publishing process. Example config can be found here: https://github.com/semantic-release/semantic-release/blob/c58fe12f90022b4d6c6e34fc0eb0e4f7b21e815a/docs/recipes/ci-configurations/github-actions.md#githubworkflowsreleaseyml-configuration-for-node-projects SREI-3017
1 parent 5568a13 commit 6b5dcd7

3 files changed

Lines changed: 3728 additions & 2682 deletions

File tree

.github/workflows/library.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fetch-depth: 0
1919
- uses: actions/setup-node@v4
2020
with:
21-
node-version: 18
21+
node-version: 24
2222
- name: Install dependencies
2323
uses: bahmutov/npm-install@v1
2424
- name: Run linter
@@ -31,22 +31,25 @@ jobs:
3131
release:
3232
if: github.ref == 'refs/heads/main'
3333
runs-on: ubuntu-latest
34+
permissions:
35+
id-token: write # to enable use of OIDC for trusted publishing and npm provenance
3436
steps:
3537
- uses: actions/checkout@v4
3638
with:
3739
fetch-depth: 0
3840
- uses: actions/setup-node@v4
3941
with:
40-
node-version: 18
42+
node-version: 24
4143
- name: Install dependencies
4244
uses: bahmutov/npm-install@v1
45+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
46+
run: npm audit signatures
4347
- name: Run build
4448
run: npm run build
4549
- name: Release
4650
run: npx semantic-release
4751
env:
4852
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5053

5154
merge-main:
5255
if: github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)