Skip to content

Commit c5f67fc

Browse files
authored
Merge pull request #120 from matrix-org/af/npm-trusted-publishing
Support NPM Trusted Publishing
2 parents 34ab4f3 + 00fa5aa commit c5f67fc

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish to NPM
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-to-npm:
9+
runs-on: ubuntu-24.04
10+
permissions:
11+
contents: write
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Use Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version-file: .node-version
19+
registry-url: https://registry.npmjs.org/
20+
- name: Upgrade npm for Trusted Publishing
21+
run: npm i -g npm@latest
22+
- run: yarn --strict-semver --frozen-lockfile
23+
- run: yarn build
24+
- name: Publish to npmjs.com
25+
run: npm publish --access public --provenance

changelog.d/120.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update CI to use NPM Trusted Publishing.

0 commit comments

Comments
 (0)