Runtime: Parallel bundle fetch, ETag support, long-polling support #68
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Check | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| base_ref: | |
| description: 'Base branch to compare against (e.g. main)' | |
| required: true | |
| default: 'main' | |
| pull_request: {} | |
| # When a new revision is pushed to a PR, cancel all in-progress CI runs for that | |
| # PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| release-check: | |
| name: Release version check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 # Fetch full history to access all commits | |
| persist-credentials: false | |
| - name: Check for release commits | |
| id: check-release | |
| run: | | |
| RESULT=$(./tools/build/get-release-from-commits.sh "origin/${GITHUB_BASE_REF}" "HEAD") | |
| echo "Release commits detected: $RESULT" | |
| if [ -n "$RESULT" ]; then | |
| echo "result=true" >> $GITHUB_OUTPUT | |
| echo "commit_version=$RESULT" >> $GITHUB_OUTPUT | |
| else | |
| echo "result=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Get CHANGELOG version from PR | |
| if: steps.check-release.outputs.result == 'true' | |
| id: changelog | |
| run: | | |
| CHANGELOG_VERSION=$(grep -o -E '## [0-9.]+' CHANGELOG.md | head -n 1 | sed 's/## //' | grep -E '^[0-9.]+$' || echo "invalid") | |
| echo "version=$CHANGELOG_VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Verify release versions match | |
| if: steps.check-release.outputs.result == 'true' | |
| env: | |
| COMMIT_VERSION: ${{ steps.check-release.outputs.commit_version }} | |
| CHANGELOG_VERSION: ${{ steps.changelog.outputs.version }} | |
| run: | | |
| echo "ℹ️ Release Commit Detected" | |
| echo "" | |
| echo "This PR contains commit(s) that match the case-insensitive regex \`^Release .*\`" | |
| echo "" | |
| echo "Here are the latest versions reported from the places the release workflows will use:" | |
| echo "" | |
| echo "| Source | Version |" | |
| echo "| --- | --- |" | |
| echo "| Commit matching \`^Release .*\` | $COMMIT_VERSION |" | |
| echo "| \`CHANGELOG.md\` | $CHANGELOG_VERSION |" | |
| echo "" | |
| if [ "$COMMIT_VERSION" != "$CHANGELOG_VERSION" ]; then | |
| echo "❌ Version mismatch detected! All sources must agree before creating a release." >&2 | |
| exit 1 | |
| fi | |
| echo "✅ All version sources agree: $COMMIT_VERSION" |