File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release (main)
2+
13on :
24 push :
35 branches :
68jobs :
79 build-test-release :
810 runs-on : ubuntu-latest
9- env :
10- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }} # make token available to all steps
1111 permissions :
1212 contents : read
1313 id-token : write # CRITICAL: This enables OIDC authentication
14- packages : write
1514
1615 steps :
1716 - name : Checkout
3938 - name : Build library
4039 run : npm run build
4140
42- - name : Configure npm auth (for verification steps)
43- run : |
44- # write auth token into the runner userconfig so npm CLI will use it
45- # we avoid printing the token; GitHub masks secrets automatically
46- npm config set //registry.npmjs.org/:_authToken "${NODE_AUTH_TOKEN}" --userconfig /home/runner/work/_temp/.npmrc || true
47-
48- - name : Verify npm auth + dry run
49- run : |
50- echo "whoami:"
51- npm whoami --registry=https://registry.npmjs.org || true
52- echo "--- npm config (userconfig) ---"
53- npm config list --userconfig /home/runner/work/_temp/.npmrc || true
54- echo "--- dry-run publish (will NOT publish) ---"
55- cd dist/ngbootstrap && npm publish --access public --dry-run || true
56-
5741 - name : Publish to npm
42+ # OIDC handles authentication automatically now.
5843 working-directory : dist/ngbootstrap
59- run : npm publish --provenance --access public
44+ run : npm publish --provenance --access public # publish the built package only
You can’t perform that action at this time.
0 commit comments