Skip to content
Draft
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
9 changes: 9 additions & 0 deletions .github/workflows/compile-observer-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ jobs:
- linux-engine-build
- windows-engine-build
if: github.event_name == 'push' && github.ref == 'refs/heads/semper/compile-observer'
concurrency:
group: semper-exp-current-publisher
cancel-in-progress: true
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -355,6 +358,12 @@ jobs:
set -euo pipefail
CANDIDATE_SHA="${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}"
TAG="${EXPERIMENTAL_TAG}"
BRANCH="semper/compile-observer"
CURRENT_HEAD="$(gh api "repos/${GITHUB_REPOSITORY}/git/ref/heads/${BRANCH}" --jq '.object.sha')"
if [[ "${CURRENT_HEAD}" != "${CANDIDATE_SHA}" ]]; then
echo "refusing to publish superseded candidate ${CANDIDATE_SHA}; ${BRANCH} is now ${CURRENT_HEAD}" >&2
exit 1
fi

if gh api "repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG}" >/dev/null 2>&1; then
gh api --method PATCH "repos/${GITHUB_REPOSITORY}/git/refs/tags/${TAG}" \
Expand Down