Skip to content

Commit 870196c

Browse files
committed
ci(release): run the hash refresh from the dispatched ref
1 parent c12a6cd commit 870196c

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎.github/workflows/prerelease.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ jobs:
8989
NEXT: ${{ steps.version.outputs.next }}
9090
run: |
9191
set -euo pipefail
92+
# Taken from the dispatched ref before the release branch is checked out: a frozen
93+
# branch cut before this script existed would not have it.
94+
cp .github/scripts/refresh-nix-npm-hash.sh "$RUNNER_TEMP/"
9295
git config user.name "github-actions[bot]"
9396
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
9497
# ONE release branch per STABLE version (release/vX.Y.Z), created at rc.1 and
@@ -117,7 +120,7 @@ jobs:
117120
# lockfile behind on every release up to 1.9.0; see the script header.
118121
node .github/scripts/set-release-version.mjs "${PRERELEASE}"
119122
# The lockfile's version is part of Nix's npm hash: refresh it in this same commit.
120-
bash .github/scripts/refresh-nix-npm-hash.sh
123+
bash "$RUNNER_TEMP/refresh-nix-npm-hash.sh"
121124
git add package.json package-lock.json nix/package.nix
122125
git commit -m "chore(release): bump to ${PRERELEASE} [skip ci]" || echo "(version already at ${PRERELEASE})"
123126
git push "$REMOTE" "$BRANCH"

‎.github/workflows/promote.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ jobs:
7272
STABLE_VERSION: ${{ steps.version.outputs.stable_version }}
7373
run: |
7474
set -euo pipefail
75+
# Taken from the dispatched ref before the release branch is checked out: a frozen
76+
# branch cut before this script existed would not have it.
77+
cp .github/scripts/refresh-nix-npm-hash.sh "$RUNNER_TEMP/"
7578
# Promote checks out the FROZEN release branch (created by prerelease.yml) and
7679
# rewrites the version there. This guarantees the stable tag points at the
7780
# same code that was tested as the RC plus any cherry-picked bugfixes.
@@ -83,7 +86,7 @@ jobs:
8386
# lockfile behind on every release up to 1.9.0; see the script header.
8487
node .github/scripts/set-release-version.mjs "${STABLE_VERSION}"
8588
# The lockfile's version is part of Nix's npm hash: refresh it in this same commit.
86-
bash .github/scripts/refresh-nix-npm-hash.sh
89+
bash "$RUNNER_TEMP/refresh-nix-npm-hash.sh"
8790
git config user.name "github-actions[bot]"
8891
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
8992
git add package.json package-lock.json nix/package.nix

0 commit comments

Comments
 (0)