Skip to content

Commit 3a6bbab

Browse files
[FSSDK-12882] review feedback
1 parent a73db2d commit 3a6bbab

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/ghr_backfill.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
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

.github/workflows/react_release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
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

scripts/publish.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
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
#

0 commit comments

Comments
 (0)