Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

Tidy OK release workflow leftovers from the credential split (#5592)

Nick Gomez0e70a701f24c
diff --git a/.github/scripts/release-cascade-shape.test.mjs b/.github/scripts/release-cascade-shape.test.mjs
index 119c10dc3..71c680df7 100644
--- a/.github/scripts/release-cascade-shape.test.mjs
+++ b/.github/scripts/release-cascade-shape.test.mjs
@@ -2092,6 +2092,20 @@ describe('the release App credential never shares a job with installed packages'
expect(releaseWorkflow.permissions).toEqual({ contents: 'read' });
});
+ test('the build job checks the package surface with the exact npm the publish job publishes with', () => {
+ const npmInstalls = (job) =>
+ steps(job).flatMap((step) =>
+ commands(step)
+ .split('\n')
+ .map((line) => line.trim())
+ .filter((line) => line.startsWith('npm install -g npm@')),
+ );
+ const published = npmInstalls(releaseWorkflow.jobs.publish);
+ expect(published).toHaveLength(1);
+ expect(published[0]).toMatch(/^npm install -g npm@\d+\.\d+\.\d+$/);
+ expect(npmInstalls(releaseWorkflow.jobs.build)).toEqual(published);
+ });
+
test.each([
['an install in the publish job', (w) => w.jobs.publish.steps.push({ name: 'Install', run: 'pnpm install --frozen-lockfile' }), 'publish runs package code'],
['changeset publish in the publish job', (w) => replacePublishLine(w, 'pnpm exec changeset publish --tag "$TAG"'), 'publish runs package code'],
@@ -2227,7 +2241,7 @@ describe('the release App credential never shares a job with installed packages'
`process.exit(${exitWhen} ? 1 : 0);`,
'',
].join('\n');
- writeFileSync(join(bin, 'git'), recorder("args[0] === 'rev-parse'"), { mode: 0o755 });
+ writeFileSync(join(bin, 'git'), recorder('false'), { mode: 0o755 });
writeFileSync(join(bin, 'gh'), recorder("args[0] === 'release' && args[1] === 'view'"), { mode: 0o755 });
let runs = 0;
const tagStepRun = (workflow) => {
diff --git a/.github/workflows/desktop-build-win-linux.yml b/.github/workflows/desktop-build-win-linux.yml
index 4141ab3dc..3cfd04bcb 100644
--- a/.github/workflows/desktop-build-win-linux.yml
+++ b/.github/workflows/desktop-build-win-linux.yml
@@ -224,7 +224,7 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Download workspace bundle
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v5.0.0
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: workspace-bundle
path: packages/
@@ -486,7 +486,7 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Download workspace bundle
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v5.0.0
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: workspace-bundle
path: packages/
diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml
index 98f3827fc..7b83665fe 100644
--- a/.github/workflows/desktop-release.yml
+++ b/.github/workflows/desktop-release.yml
@@ -1085,7 +1085,7 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Download workspace bundle
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v5.0.0
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: workspace-bundle
path: packages/
@@ -1433,7 +1433,7 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Download workspace bundle
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v5.0.0
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: workspace-bundle
path: packages/
@@ -1647,7 +1647,7 @@ jobs:
REQUIRED: ${{ needs.prepare.outputs.required }}
steps:
- name: Download all platform release assets
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v5.0.0
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: "*-release-assets"
merge-multiple: true
diff --git a/.github/workflows/linear-release.yml b/.github/workflows/linear-release.yml
index 5698b18fd..f3fa7489d 100644
--- a/.github/workflows/linear-release.yml
+++ b/.github/workflows/linear-release.yml
@@ -135,7 +135,7 @@ jobs:
# idempotent.
- name: Sync issues into the Linear release
if: env.HAS_KEY == 'true'
- uses: linear/linear-release-action@c0cb8354a362c24c6d3e0948f37fd66d07588e3f # v0
+ uses: linear/linear-release-action@c0cb8354a362c24c6d3e0948f37fd66d07588e3f # v0.14.5
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
command: sync
@@ -155,7 +155,7 @@ jobs:
# every stable. Nothing is left half-finished.
- name: Advance to Beta stage (beta cut)
if: env.HAS_KEY == 'true' && steps.derive.outputs.channel == 'beta'
- uses: linear/linear-release-action@c0cb8354a362c24c6d3e0948f37fd66d07588e3f # v0
+ uses: linear/linear-release-action@c0cb8354a362c24c6d3e0948f37fd66d07588e3f # v0.14.5
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
command: update
@@ -167,7 +167,7 @@ jobs:
# Linear status automations.
- name: Complete the release (stable only)
if: env.HAS_KEY == 'true' && steps.derive.outputs.channel == 'stable'
- uses: linear/linear-release-action@c0cb8354a362c24c6d3e0948f37fd66d07588e3f # v0
+ uses: linear/linear-release-action@c0cb8354a362c24c6d3e0948f37fd66d07588e3f # v0.14.5
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
command: complete
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d96bd8f08..1dcc0e8f2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -214,7 +214,7 @@ jobs:
- name: Ensure npm 11 for the cli's package surface check
run: |
- npm install -g npm@11
+ npm install -g [email protected]
echo "npm $(npm --version)"
- name: Install
@@ -658,21 +658,13 @@ jobs:
NOTES_B64: ${{ needs.build.outputs.notes_b64 }}
run: |
set -euo pipefail
- # Idempotency: a workflow re-fire (manual recovery from a flaky
- # npm publish, or workflow_dispatch re-run) should not explode
- # on `git tag` already exists. Within the concurrency slot, a
- # tag-exists state only arises on retry.
- if git rev-parse "refs/tags/${TAG}" >/dev/null 2>&1; then
- echo "Tag ${TAG} already exists locally; skipping git tag step."
- else
- git config user.name "github-actions[bot]"
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- git tag "$TAG"
- # shellcheck disable=SC2016
- git -c credential.helper= \
- -c 'credential.helper=!f() { test "$1" = get || return 0; echo username=x-access-token; echo "password=$GH_TOKEN"; }; f' \
- push origin "$TAG"
- fi
+ git config user.name "github-actions[bot]"
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ git tag "$TAG"
+ # shellcheck disable=SC2016
+ git -c credential.helper= \
+ -c 'credential.helper=!f() { test "$1" = get || return 0; echo username=x-access-token; echo "password=$GH_TOKEN"; }; f' \
+ push origin "$TAG"
BODY_FILE=$(mktemp)
if [[ -n "${NOTES_B64:-}" ]]; then
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 262481a1a..8831e562d 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -18,7 +18,7 @@ jobs:
steps:
- name: Mark stale pull requests
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10
+ uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
stale-pr-message: |
This pull request has been automatically marked as stale because it has not had recent activity.