File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 - name : Setup Node
2323 uses : actions/setup-node@v4
2424 with :
25- node-version : 20
25+ node-version : 22
2626
2727 - name : Get package version
2828 id : package_version
6868
6969 permissions :
7070 contents : read
71+ id-token : write
7172
7273 steps :
7374 - name : Checkout repository
7677 - name : Setup Node
7778 uses : actions/setup-node@v4
7879 with :
79- node-version : 20
80+ node-version : 22
8081 registry-url : https://registry.npmjs.org/
8182
83+ - name : Show tool versions
84+ run : |
85+ node --version
86+ npm --version
87+
8288 - name : Install dependencies
8389 run : npm ci
8490
@@ -99,16 +105,6 @@ jobs:
99105 echo "Version ${PACKAGE_NAME}@${PACKAGE_VERSION} does not exist on npm. Publishing."
100106 fi
101107
102- - name : Verify npm auth
103- run : npm whoami
104- env :
105- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
106-
107- - name : Publish to NPM
108+ - name : Publish to NPM with trusted publishing
108109 if : steps.npm_check.outputs.exists == 'false'
109- run : |
110- echo "::remove-mask::$NODE_AUTH_TOKEN"
111- echo "NPM TOKEN $NODE_AUTH_TOKEN"
112- npm publish --access public
113- env :
114- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
110+ run : npm publish --provenance --access public
You can’t perform that action at this time.
0 commit comments