diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c040d198e..5dc45885f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -132,30 +132,14 @@ jobs: - name: Resolve component versions id: versions run: | - # One release stream: a `v*` tag names both components' versions. RELEASE_TAG="$(git tag --points-at HEAD --list 'v*' | sort -V | tail -1)" GATEWAY_VERSION="${RELEASE_TAG#v}" RUNTIME_VERSION="${RELEASE_TAG#v}" - # `dev+` is what a build that is NOT a release reports, and it is - # honest now that such a build no longer publishes :latest: the version - # names the commit it came from, and the sha- tag makes it - # restorable. Before, this same string reached :latest minutes after a - # release and made the release's own stamping read as dev - # (archie-core-i5nb). (On an untagged push GITHUB_SHA IS the commit — - # the tag case is handled by the dereference above.) [ -n "$GATEWAY_VERSION" ] || GATEWAY_VERSION="dev+${GITHUB_SHA:0:12}" [ -n "$RUNTIME_VERSION" ] || RUNTIME_VERSION="dev+${GITHUB_SHA:0:12}" echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT" echo "gateway=$GATEWAY_VERSION" >> "$GITHUB_OUTPUT" echo "runtime=$RUNTIME_VERSION" >> "$GITHUB_OUTPUT" - # :latest names the newest PROMOTED release, so a release publishes - # :v and canary promotion moves :latest to it. A push to - # main publishes :edge (mutable, newest main) and sha- - # (immutable), so an ordinary commit never overwrites a release's - # stamping. - # - # `if` blocks rather than `[ -n "$X" ] && echo`: the latter returns - # non-zero when the test fails, and these steps run under `set -e`. { echo "archied_tags< "$name/release.json" - # README.md doesn't exist yet in this repo; include it once it does - # rather than fail the release on its absence. [ -f README.md ] && cp README.md "$name/" zip -r "$name.zip" "$name" echo "name=$name" >> "$GITHUB_OUTPUT" @@ -350,7 +318,6 @@ jobs: api="https://git.catlow.cloud/api/v1" repo="sam/archie" auth="Authorization: token $DEPLOY_TOKEN" - # Idempotent: a re-run replaces the release on the tag. curl -sf -X DELETE -H "$auth" "$api/repos/$repo/releases/tags/$tag" >/dev/null || true curl -sf -X POST -H "$auth" -H "Content-Type: application/json" \ -d "$(jq -n --arg tag "$tag" --arg name "Archie v$version" --arg body "$(cat "$notes")" \