Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Release

# Runs the full test workflow, then builds the three components from the same commit and
# publishes them, with the test run's bundler compatibility reports, as GitHub release
# assets so the Spin templates (templates/sandbox-*) can reference them by URL + digest.
# Runs the test workflow, then builds the three components from the same commit and
# publishes them as GitHub release assets. Bundler compatibility reports are included
# when the optional live bundler tests are enabled for a manual release.
#
# - push a tag `vX.Y.Z` -> a versioned release with that tag
# - run manually -> a rolling `canary` prerelease
Expand All @@ -15,6 +15,12 @@ on:
tags:
- "v*"
workflow_dispatch:
inputs:
run-bundler:
description: Run the live bundler integration and compatibility gates.
type: boolean
required: false
default: false

permissions:
contents: read
Expand All @@ -32,7 +38,7 @@ jobs:
tests:
uses: ./.github/workflows/test.yml
with:
run-bundler: false
run-bundler: ${{ inputs.run-bundler || false }}

release:
needs: tests
Expand Down Expand Up @@ -94,6 +100,7 @@ jobs:
node tests/check-imports.mjs

- name: Download compatibility reports from the test run
if: inputs.run-bundler == true
uses: actions/download-artifact@v4
with:
name: bundler-test-results
Expand All @@ -104,8 +111,13 @@ jobs:
run: |
mkdir -p _dist
cp dist/ts-sandbox.wasm dist/py-sandbox.wasm packages/typescript/bundler/dist/bundler.wasm _dist/
tar -czf "_dist/compatibility-${GITHUB_SHA}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}.tar.gz" -C _reports .
( cd _dist && sha256sum ts-sandbox.wasm py-sandbox.wasm bundler.wasm compatibility-*.tar.gz > "checksums-${RELEASE_VERSION}.txt" )
files=(ts-sandbox.wasm py-sandbox.wasm bundler.wasm)
if [[ -d _reports ]]; then
report="compatibility-${GITHUB_SHA}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}.tar.gz"
tar -czf "_dist/${report}" -C _reports .
files+=("$report")
fi
( cd _dist && sha256sum "${files[@]}" > "checksums-${RELEASE_VERSION}.txt" )
cat "_dist/checksums-${RELEASE_VERSION}.txt"

- name: Move canary tag
Expand All @@ -122,8 +134,4 @@ jobs:
fail_on_unmatched_files: true
generate_release_notes: true
files: |
_dist/ts-sandbox.wasm
_dist/py-sandbox.wasm
_dist/bundler.wasm
_dist/checksums-*.txt
_dist/compatibility-*.tar.gz
_dist/*
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ on:
branches: [main]
pull_request:
workflow_dispatch:
inputs:
run-bundler:
description: Run the live bundler integration and compatibility gates.
type: boolean
required: false
default: true
workflow_call:
inputs:
run-bundler:
Expand Down Expand Up @@ -147,7 +153,7 @@ jobs:

bundler:
name: bundler
if: github.event_name == 'workflow_dispatch' || inputs.run-bundler == true
if: inputs.run-bundler == true
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -228,7 +234,7 @@ jobs:
UNIT_RESULT: ${{ needs.unit.result }}
SANDBOXES_RESULT: ${{ needs.sandboxes.result }}
BUNDLER_RESULT: ${{ needs.bundler.result }}
EXPECTED_BUNDLER_RESULT: ${{ (github.event_name == 'workflow_dispatch' || inputs.run-bundler == true) && 'success' || 'skipped' }}
EXPECTED_BUNDLER_RESULT: ${{ inputs.run-bundler == true && 'success' || 'skipped' }}
run: |
[[ "$AUDIT_RESULT" == success ]]
[[ "$UNIT_RESULT" == success ]]
Expand Down
Loading