Merge pull request 'KAN-58: Fix macOS release runner selection' (#155) from fix/KAN-58-macos-runner-selection into main
CI/CD / preconditions (push) Canceled after 0s
CI/CD / test_and_check_app (push) Canceled after 0s
CI/CD / Publish immutable image (push) Canceled after 0s
Native JavaScript checks / Native launcher and release tests (push) Canceled after 0s
macOS checks / Native Rust tests and unsigned build (push) Canceled after 6s
macOS release to Hetzner / Validate release ref and configuration (push) Successful in 21s
macOS release to Hetzner / Sign, notarize, verify and publish macOS (push) Failing after 3m11s
CI/CD / preconditions (push) Canceled after 0s
CI/CD / test_and_check_app (push) Canceled after 0s
CI/CD / Publish immutable image (push) Canceled after 0s
Native JavaScript checks / Native launcher and release tests (push) Canceled after 0s
macOS checks / Native Rust tests and unsigned build (push) Canceled after 6s
macOS release to Hetzner / Validate release ref and configuration (push) Successful in 21s
macOS release to Hetzner / Sign, notarize, verify and publish macOS (push) Failing after 3m11s
Reviewed-on: #155
This commit was merged in pull request #155.
This commit is contained in:
@@ -37,7 +37,6 @@ jobs:
|
||||
outputs:
|
||||
commit: ${{ steps.ref.outputs.commit }}
|
||||
tag: ${{ steps.ref.outputs.tag }}
|
||||
runner: ${{ steps.ref.outputs.runner }}
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
@@ -64,7 +63,7 @@ jobs:
|
||||
commit="$(git rev-parse --verify "refs/tags/$tag^{commit}")"
|
||||
git merge-base --is-ancestor "$commit" origin/main || { echo 'Release tag must belong to main.' >&2; exit 1; }
|
||||
git checkout --detach "$commit"
|
||||
printf 'commit=%s\ntag=%s\nrunner=%s\n' "$commit" "$tag" "$MACOS_RUNNER" >> "$GITHUB_OUTPUT"
|
||||
printf 'commit=%s\ntag=%s\n' "$commit" "$tag" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
@@ -81,7 +80,8 @@ jobs:
|
||||
release:
|
||||
name: Sign, notarize, verify and publish macOS
|
||||
needs: prepare
|
||||
runs-on: ${{ needs.prepare.outputs.runner }}
|
||||
# Gitea resolves runner labels before outputs from prepare are available.
|
||||
runs-on: ${{ vars.MACOS_RUNNER }}
|
||||
timeout-minutes: 120
|
||||
env:
|
||||
RELEASE_TAG: ${{ needs.prepare.outputs.tag }}
|
||||
|
||||
@@ -86,13 +86,22 @@ test('release selection succeeds using Git alone without an administrative API t
|
||||
GITHUB_API_URL: 'http://127.0.0.1:1',
|
||||
});
|
||||
assert.equal(result.status, 0, result.stderr);
|
||||
assert.equal(
|
||||
result.output,
|
||||
`commit=${f.commit}\ntag=macos-v1.2.3\nrunner=macos-local\n`,
|
||||
);
|
||||
assert.equal(result.output, `commit=${f.commit}\ntag=macos-v1.2.3\n`);
|
||||
assert.equal(f.git(f.checkout, 'rev-parse', 'HEAD'), f.commit);
|
||||
});
|
||||
|
||||
test('macOS scheduling uses a repository variable while release steps remain gated by preparation', () => {
|
||||
const release = workflow.split('\n release:\n')[1];
|
||||
const runner = release.match(/^ {4}runs-on: (.+)$/m)?.[1];
|
||||
assert.equal(runner, '${{ vars.MACOS_RUNNER }}');
|
||||
assert.match(release, /^ {4}needs: prepare$/m);
|
||||
assert.match(release, /ref: \$\{\{ needs\.prepare\.outputs\.commit \}\}/);
|
||||
assert.match(
|
||||
release,
|
||||
/RELEASE_TAG: \$\{\{ needs\.prepare\.outputs\.tag \}\}/,
|
||||
);
|
||||
});
|
||||
|
||||
test('manual release on main accepts an existing tag without moving it', (t) => {
|
||||
const f = fixture(t);
|
||||
const result = f.run({
|
||||
|
||||
Reference in New Issue
Block a user