Skip to content

Commit e09f99b

Browse files
authored
ci: publish all variants in every contracts version on tag push (#23)
Tag-push releases previously published only the default contracts version (v3.2), so v2.1 variants required a separate manual workflow_dispatch. Set the push path to 'all' so each tag publishes every variant x every nitro-contracts version that has a snapshot bundle (matrix builder skips combos without one), giving us both v2.1 and v3.2 images to test against. Removes the now-unused 'Read code defaults' step.
1 parent 3c1cd19 commit e09f99b

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

.github/workflows/release-testnode-image.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,20 @@ jobs:
6060
- name: Checkout
6161
uses: actions/checkout@v4
6262

63-
- name: Read code defaults
64-
id: defaults
65-
run: >-
66-
node --input-type=module -e
67-
"import { DEFAULT_NITRO_CONTRACTS_VERSION } from './packages/testnode/src/runtime.mjs';
68-
const { appendFileSync } = await import('node:fs');
69-
appendFileSync(process.env.GITHUB_OUTPUT, 'nitro-contracts-version=' + DEFAULT_NITRO_CONTRACTS_VERSION + '\\n');"
70-
7163
- name: Resolve testnode inputs
7264
id: resolve
7365
env:
74-
# On a tag push, publish every variant. Each variant installs its own
66+
# On a tag push, publish every variant in every nitro-contracts version
67+
# so we can test against either. Each variant installs its own
7568
# pre-generated snapshot bundle (per-variant snapshotReleaseTag in
7669
# runtime.mjs), so snapshot-version here is unused for publishing and
77-
# passed only to satisfy resolve-testnode.mjs. The default nitro-contracts
78-
# version comes from code (steps.defaults), not a YAML literal.
70+
# passed only to satisfy resolve-testnode.mjs. The matrix builder skips
71+
# variant x version combos that have no snapshot bundle.
7972
TESTNODE_NAME: ${{ github.event_name == 'push' && '' || inputs.name }}
8073
TESTNODE_VERSION: ${{ github.event_name == 'push' && github.ref_name || inputs.version }}
8174
TESTNODE_SNAPSHOT_VERSION: ${{ github.event_name == 'push' && github.ref_name || inputs.snapshot-version }}
8275
TESTNODE_VARIANT: ${{ github.event_name == 'push' && 'all' || inputs.variant }}
83-
TESTNODE_NITRO_CONTRACTS_VERSION: ${{ github.event_name == 'push' && steps.defaults.outputs.nitro-contracts-version || inputs.nitro-contracts-version }}
76+
TESTNODE_NITRO_CONTRACTS_VERSION: ${{ github.event_name == 'push' && 'all' || inputs.nitro-contracts-version }}
8477
run: >-
8578
node scripts/ci/resolve-testnode.mjs
8679
--name "$TESTNODE_NAME"

0 commit comments

Comments
 (0)