Skip to content

Commit 81214db

Browse files
update npm publish
1 parent b9b2961 commit 81214db

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/svf-lib_publish.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
push:
66
branches: [ master ]
77

8+
permissions:
9+
contents: read
10+
id-token: write
11+
812
# Customize the env variable
913
env:
1014
SVF_CTIR: 1
@@ -15,6 +19,7 @@ jobs:
1519
publish:
1620
if: github.repository == 'SVF-tools/SVF'
1721
runs-on: ${{ matrix.os }}
22+
environment: npm-publish
1823
env:
1924
XCODE_VERSION: '15.3.0' # Define Xcode version here to reuse it
2025
strategy:
@@ -23,7 +28,7 @@ jobs:
2328

2429
steps:
2530
# checkout the repo
26-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v4
2732
# setup the environment
2833
- name: mac-setup
2934
if: runner.os == 'macOS'
@@ -140,9 +145,9 @@ jobs:
140145
cd $GITHUB_WORKSPACE
141146
142147
# publish svf
143-
- uses: actions/setup-node@v3
148+
- uses: actions/setup-node@v4
144149
with:
145-
node-version: 18
150+
node-version: 20
146151
registry-url: https://registry.npmjs.org/
147152
- name: publish-svf
148153
if: |
@@ -158,7 +163,9 @@ jobs:
158163
sed -i '/version/s/[^:]*$/'"\"${npm_version}\",/" package.json
159164
git add .
160165
if [ -n "$(git status -s)" ]; then git commit -m'update version' ; fi
166+
npm i -g npm@latest
161167
npm version patch
162-
npm publish
168+
npm publish --access public
163169
env:
164-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
170+
NODE_AUTH_TOKEN: ""
171+
NPM_CONFIG_USERCONFIG: ""

0 commit comments

Comments
 (0)