fix(release): push the release commit and its tag atomically
This commit is contained in:
3 files changed
+13
-12
No files matched your search
@@ -15,11 +15,11 @@ on:
|
||||
# last one's images matter (each job pushes its image tags), so cancel a
|
||||
# superseded run rather than let it fight for resources it can't use.
|
||||
#
|
||||
# Keyed on the commit, not github.ref: `git push --follow-tags` pushes
|
||||
# main plus both archied/v* and archie/v* tags in one go, and all three
|
||||
# refs point at the same commit -- on.push matches branches and tags
|
||||
# both, so a single release push otherwise fires three redundant builds
|
||||
# of identical content that a ref-keyed group can't see as the same work.
|
||||
# Keyed on the commit, not github.ref: a release push lands main and its
|
||||
# tag in one go, both pointing at the same commit -- on.push matches
|
||||
# branches and tags both, so a single release push otherwise fires
|
||||
# redundant builds of identical content that a ref-keyed group can't see
|
||||
# as the same work.
|
||||
concurrency:
|
||||
group: deploy-${{ github.sha }}
|
||||
cancel-in-progress: true
|
||||
@@ -372,8 +372,8 @@ jobs:
|
||||
# zip was produced and then stranded -- the only Release on this repo
|
||||
# (archied/v1.22.0) was created by hand and carries no asset at all.
|
||||
#
|
||||
# Attached to the *archied* tag because the zip is named and versioned
|
||||
# for archied, and `--follow-tags` pushes both tags at one commit.
|
||||
# Attached to the release's v* tag, or the archied tag for a release
|
||||
# cut before the single release stream.
|
||||
# --generate-notes is deliberately not used: the changelog section is
|
||||
# the release's own reviewed prose, and the tag/changelog gate above
|
||||
# already guarantees it describes this version.
|
||||
|
||||
+3
-2
@@ -57,7 +57,7 @@ task release:preview VERSION=1.3.0 # preview what would land
|
||||
task release:prepare VERSION=1.3.0 # write the section into CHANGELOG.md, uncommitted
|
||||
# edit CHANGELOG.md -- generated notes are a starting point, not the release
|
||||
task release VERSION=1.3.0 # commit + annotated tag
|
||||
git push origin main --follow-tags # CI stamps images with real versions
|
||||
git push --atomic origin main v1.3.0 # both refs or neither
|
||||
```
|
||||
|
||||
`release:prepare` emits bare commit subjects; they are a starting point. Rewrite
|
||||
@@ -66,7 +66,8 @@ them to say what a reader gets, per "What the notes are for" above.
|
||||
Pushing is a separate, explicit step — never push without confirming first (see
|
||||
the repo's general "check before doing anything hard to reverse" rule). The
|
||||
deploy workflow reads tags pointing at `HEAD`; pushing the commit without its
|
||||
tag gets images stamped `dev`.
|
||||
tag gets images stamped `dev`, which is why the push names the tag and is
|
||||
`--atomic`.
|
||||
|
||||
### After a release, `main` and the working branch have diverged
|
||||
|
||||
|
||||
+3
-3
@@ -210,7 +210,7 @@ git tag -a "v$VERSION" -m "v$VERSION"
|
||||
|
||||
echo
|
||||
echo "tagged. push with:"
|
||||
echo " git push origin main --follow-tags"
|
||||
echo " git push --atomic origin main v$VERSION"
|
||||
echo
|
||||
echo "The deploy workflow reads the tags pointing at HEAD, so pushing the"
|
||||
echo "commit without its tag builds images stamped 'dev'."
|
||||
echo "The deploy workflow reads the tags pointing at HEAD, so the commit and"
|
||||
echo "its tag must land together; --atomic pushes both or neither."
|
||||
Reference in new issue
Block a user