Skip to content

Commit 8188e9b

Browse files
committed
ci: npm new publish scripts
1 parent 9e0145e commit 8188e9b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/npm-publish.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
# When anyone pushes to npm branch in this repo, the package will be published to npm. This action requires
2-
# access to NPM_TOKEN secret. Contact core.ai admins to get access to core.ais org tokens.
3-
# To publish to your own npm account, follow this https://docs.npmjs.com/creating-and-viewing-access-tokens
1+
# When anyone pushes to npm branch in this repo, the package will be published to npm.
2+
# https://docs.npmjs.com/trusted-publishers is active in this repo
43
name: Publish package to npm
54

65
on:
76
push:
87
branches: [ npm ]
98

9+
permissions:
10+
id-token: write # Required for OIDC
11+
contents: read
12+
1013
jobs:
1114
build-tasks:
1215
runs-on: ubuntu-latest
1316
steps:
14-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v6
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '24'
21+
registry-url: 'https://registry.npmjs.org'
1522
- name: Npm Install
1623
run: |
17-
npm install
24+
npm ci
1825
- name: building package
1926
run: |
2027
npm run build
@@ -24,5 +31,3 @@ jobs:
2431
- name: Publishing package to npm repository
2532
run: |
2633
npm publish --access public
27-
env:
28-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)