File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -33,25 +33,31 @@ jobs:
3333 needs : [ compile, test ]
3434 if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
3535 runs-on : ubuntu-latest
36+ permissions :
37+ contents : write # for pushing tags
38+ id-token : write # required for OIDC
3639 steps :
3740 - name : Checkout repo
38- uses : actions/checkout@v3
41+ uses : actions/checkout@v4
3942 - name : Set up node
40- uses : actions/setup-node@v3
43+ uses : actions/setup-node@v4
44+ with :
45+ node-version : lts/*
46+ registry-url : ' https://registry.npmjs.org'
47+ cache : npm
48+ - name : Update npm
49+ run : npm install -g npm@latest # Ensure npm 11.5.1 or later is installed for OIDC support
4150 - name : Install dependencies
4251 run : yarn install
4352 - name : Build
4453 run : yarn build
4554
4655 - name : Publish to npm
4756 run : |
48- npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
4957 if [[ ${GITHUB_REF} == *alpha* ]]; then
5058 npm publish --access public --tag alpha
5159 elif [[ ${GITHUB_REF} == *beta* ]]; then
5260 npm publish --access public --tag beta
5361 else
5462 npm publish --access public
55- fi
56- env :
57- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
63+ fi
You can’t perform that action at this time.
0 commit comments