File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 - name : Setup Node.js
3737 uses : actions/setup-node@v4
3838 with :
39- node-version : ' 22 '
39+ node-version : ' 20 '
4040 registry-url : ' https://registry.npmjs.org'
4141
4242 - name : Install dependencies
@@ -45,11 +45,29 @@ jobs:
4545 - name : Build TypeScript package
4646 run : npm run build
4747
48+ - name : Preflight OIDC and npm registry
49+ working-directory : packages/flarelette-jwt-ts
50+ run : |
51+ if [ -z "${ACTIONS_ID_TOKEN_REQUEST_URL:-}" ]; then
52+ echo "OIDC token request URL is missing (check id-token: write permissions)."
53+ exit 1
54+ fi
55+ echo "OIDC environment is available."
56+ npm config get registry
57+
58+ - name : OIDC token check
59+ run : |
60+ if [ -z "${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-}" ]; then
61+ echo "OIDC request token is missing (check id-token: write permissions)."
62+ exit 1
63+ fi
64+ curl -fsS -H "Authorization: bearer ${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" \
65+ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=npm:registry.npmjs.org" > /tmp/oidc.json
66+ echo "OIDC token fetch OK"
67+
4868 - name : Publish to npm
4969 id : npm_publish
5070 working-directory : packages/flarelette-jwt-ts
51- env :
52- NODE_AUTH_TOKEN : ' '
5371 run : npm publish --provenance --access public
5472
5573 - name : Upload npm debug logs (on failure)
You can’t perform that action at this time.
0 commit comments