ci: stop cancelling master runs, and revert the release job conditions
The empty homebrew tap was never a condition problem. The release job ran, the matrix built all six targets, and the tap step then failed with "Input required and not supplied: token" because HOMEBREW_TAP_TOKEN resolves to an empty string. Four rounds of edits to those `if` expressions chased a symptom, so they go back to what they were. What stays is the CI concurrency change: a cancelled master run leaves the release gate waiting on a CI run for a commit nothing will push again.
This commit is contained in:
@@ -9,10 +9,6 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: ['**']
|
branches: ['**']
|
||||||
|
|
||||||
# Superseding a branch run saves the matrix from running twice, but a master run
|
|
||||||
# must be allowed to finish: the release workflow gates on finding a completed
|
|
||||||
# CI run for its own commit, and nothing ever pushes that commit again. A
|
|
||||||
# cancelled run there strands the release until it times out.
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|||||||
@@ -128,14 +128,6 @@ jobs:
|
|||||||
# refuse anything that is not a literal version tag.
|
# refuse anything that is not a literal version tag.
|
||||||
[[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]] || { echo "::error::unexpected tag: $tag"; exit 1; }
|
[[ "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]] || { echo "::error::unexpected tag: $tag"; exit 1; }
|
||||||
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
||||||
echo "resolved tag: '$tag'"
|
|
||||||
|
|
||||||
# The downstream jobs gate on these, and a silent empty value here cost
|
|
||||||
# four release runs, so say them out loud.
|
|
||||||
- name: Report what the downstream jobs will see
|
|
||||||
run: |
|
|
||||||
echo "created = '${{ steps.release-plz.outputs.releases_created }}'"
|
|
||||||
echo "tag = '${{ steps.tag.outputs.tag }}'"
|
|
||||||
|
|
||||||
# Attaches downloadable binaries to the release GitHub just created, or to an
|
# Attaches downloadable binaries to the release GitHub just created, or to an
|
||||||
# existing tag when dispatched manually with `tag` (recovering a target that
|
# existing tag when dispatched manually with `tag` (recovering a target that
|
||||||
@@ -143,13 +135,7 @@ jobs:
|
|||||||
binaries:
|
binaries:
|
||||||
name: ${{ matrix.target }}
|
name: ${{ matrix.target }}
|
||||||
needs: release
|
needs: release
|
||||||
# `github.event_name` is the one context proven to evaluate here: ci-gate
|
if: needs.release.outputs.created == 'true' || inputs.tag != ''
|
||||||
# uses it and skips correctly on dispatch. `inputs.tag`,
|
|
||||||
# `github.event.inputs.tag` and `needs.release.outputs.tag` were all tried
|
|
||||||
# and all left this job skipped, which is how v7.0.0 shipped to crates.io
|
|
||||||
# with an empty homebrew tap. A dispatch without a tag now fails loudly in
|
|
||||||
# the checkout below rather than skipping in silence.
|
|
||||||
if: needs.release.outputs.created == 'true' || github.event_name == 'workflow_dispatch'
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
# One flaky cross-linker must not hold back the five targets that built.
|
# One flaky cross-linker must not hold back the five targets that built.
|
||||||
@@ -206,7 +192,7 @@ jobs:
|
|||||||
homebrew:
|
homebrew:
|
||||||
name: Homebrew tap
|
name: Homebrew tap
|
||||||
needs: [release, binaries]
|
needs: [release, binaries]
|
||||||
if: needs.release.outputs.created == 'true' || github.event_name == 'workflow_dispatch'
|
if: needs.release.outputs.created == 'true' || inputs.tag != ''
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user