File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Setup
22
3+ inputs :
4+ node-version :
5+ description : Node.js version to use
6+ default : ' 22'
7+
38runs :
49 using : composite
510 steps :
6- - uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0 .0
11+ - uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3 .0
712 with :
8- node-version : 22
13+ node-version : ${{ inputs.node-version }}
914 cache : yarn
1015 registry-url : ' https://registry.npmjs.org'
1116
Original file line number Diff line number Diff line change 2121 ref : ${{ github.ref }}
2222 - name : Set up environment
2323 uses : ./.github/actions/setup
24- - name : Install npm 11 for OIDC trusted publishing
25- run : npm install -g npm@11.12.1
24+ with :
25+ node-version : ' 24 '
2626 - name : Check for new packages
2727 id : check-packages
2828 run : |
@@ -61,10 +61,15 @@ jobs:
6161 echo "All packages exist on npm — using OIDC trusted publishing"
6262 fi
6363 echo "has_new_packages=$has_new_packages" >> "$GITHUB_OUTPUT"
64- - name : Enable NPM token publishing
65- if : steps.check-packages.outputs.has_new_packages == 'true'
66- run : echo "NODE_AUTH_TOKEN=${NPM_TOKEN}" >> "$GITHUB_ENV"
64+ - name : Configure npm auth
65+ run : |
66+ if [ "$HAS_NEW_PACKAGES" = "true" ]; then
67+ echo "NODE_AUTH_TOKEN=${NPM_TOKEN}" >> "$GITHUB_ENV"
68+ else
69+ echo "NODE_AUTH_TOKEN=" >> "$GITHUB_ENV"
70+ fi
6771 env :
72+ HAS_NEW_PACKAGES : ${{ steps.check-packages.outputs.has_new_packages }}
6873 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
6974 - name : Create Prepare Release PR or Publish
7075 id : changesets
Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5+ if [ -z " ${NODE_AUTH_TOKEN:- } " ]; then
6+ unset NODE_AUTH_TOKEN
7+ fi
8+
59yarn install --frozen-lockfile
610changeset publish
711git push --follow-tags
You can’t perform that action at this time.
0 commit comments