Skip to content

Commit 481dc8b

Browse files
committed
ci: trusted publishing
1 parent a210937 commit 481dc8b

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ jobs:
1010
permissions:
1111
contents: read
1212
id-token: write
13+
1314
steps:
14-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1516

1617
- uses: actions/setup-node@v4
1718
with:
18-
node-version: 18
19+
node-version: 20
1920
registry-url: https://registry.npmjs.org/
2021

2122
- name: Install the latest version of the npm CLI
22-
run: npm install -g npm@10 #todo upgrade to the latest
23+
run: npm install -g npm@latest
2324

2425
- name: Install dependencies, build
2526
run: |
@@ -28,14 +29,8 @@ jobs:
2829
2930
- name: Publish 'latest'
3031
if: ${{ github.event.action == 'released' }}
31-
run: |
32-
npm publish --provenance
33-
env:
34-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
run: npm publish --provenance
3533

3634
- name: Publish 'next'
3735
if: ${{ github.event.action == 'prereleased' }}
38-
run: |
39-
npm publish --tag next --provenance
40-
env:
41-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
run: npm publish --tag next --provenance

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"types": "out/index.d.ts",
77
"repository": {
88
"type": "git",
9-
"url": "https://github.com/crowdin/ota-client-js.git"
9+
"url": "git+https://github.com/crowdin/ota-client-js.git"
1010
},
1111
"files": [
1212
"out/**/*"

0 commit comments

Comments
 (0)