Skip to content

Commit e7cec21

Browse files
authored
chore: Update to deploy in a trusted publishing (#58)
1 parent aca4b06 commit e7cec21

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,31 @@ on:
55
tags:
66
- '*'
77

8+
permissions:
9+
id-token: write
10+
contents: read
11+
812
jobs:
913
deploy_npm_package_and_typedoc:
1014
runs-on: ubuntu-latest
1115
steps:
1216
- name: Checkout code
13-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1418

1519
- name: Use Node.js
16-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
1721
with:
18-
node-version: 18.17.1
22+
node-version: 22.21.0
23+
registry-url: 'https://registry.npmjs.org'
24+
25+
- name: Update npm to 11.6.2
26+
run: npm install -g [email protected]
1927

2028
- name: Install Dependencies
2129
run: npm ci
2230

23-
- name: Publish to NPM
31+
- name: Publish to npm via OIDC
2432
run: npm publish
25-
env:
26-
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2733

2834
- name: Generate Typedoc
2935
run: npm run build:typedoc

.npmrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
@channel.io:registry=https://registry.npmjs.org/
2-
//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
1+
@channel.io:registry=https://registry.npmjs.org/

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@channel.io/channel-web-sdk-loader",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Official Channel Web SDK Loader",
55
"exports": {
66
".": {

0 commit comments

Comments
 (0)