File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 steps :
3131 - name : Checkout branch
3232 uses : actions/checkout@v4
33+ with :
34+ persist-credentials : false
3335
3436 - name : Set up Node
3537 uses : actions/setup-node@v4
@@ -48,12 +50,13 @@ jobs:
4850 env :
4951 NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5052 DRY_RUN : ${{ github.event.inputs.dry_run }}
53+ INPUT_VERSION : ${{ github.event.inputs.version }}
5154 run : |
5255 set -euo pipefail
5356 pkg="@optimizely/react-sdk"
5457
55- if [[ -n "${{ github.event.inputs.version }} " ]]; then
56- versions="${{ github.event.inputs.version }} "
58+ if [[ -n "$INPUT_VERSION " ]]; then
59+ versions="$INPUT_VERSION "
5760 else
5861 versions=$(npm view "$pkg" versions --json --registry https://registry.npmjs.org | jq -r '.[]')
5962 fi
Original file line number Diff line number Diff line change 1111 steps :
1212 - name : Checkout branch
1313 uses : actions/checkout@v4
14+ with :
15+ persist-credentials : false
1416
1517 - name : Set up Node
1618 uses : actions/setup-node@v4
Original file line number Diff line number Diff line change 1212# of the current working directory (used by the GHR backfill).
1313#
1414# Env:
15- # NODE_AUTH_TOKEN Auth token for the target registry. The caller is expected
16- # to have configured .npmrc (e.g. via actions/setup-node) so
17- # that @optimizely resolves to <registry-url> with this token.
15+ # NODE_AUTH_TOKEN Auth token for the target registry. The caller must have an
16+ # .npmrc entry supplying auth for <registry-url>'s host, e.g.
17+ # `//<host>/:_authToken=${NODE_AUTH_TOKEN}` (setup-node writes
18+ # this). This script passes --registry explicitly, so no
19+ # scope-to-registry routing is required (and the GHR job
20+ # intentionally does NOT route @optimizely to GHR, so that
21+ # `npm ci` still installs dependencies from npm).
1822# DRY_RUN When "true", report what would happen (publish vs. skip)
1923# without actually publishing.
2024#
You can’t perform that action at this time.
0 commit comments