fix: softprops/action-gh-release@v2 should use existing tag instead of creating a new tag (#1436)
https://github.com/Homebrew/homebrew-core/pull/228521 details the issues
I was having with the **Source code (tar.gz)** artifact for our GitHub
releases not being quite right. I landed these PRs as stabs in the dark
to fix this:
- https://github.com/openai/codex/pull/1423
- https://github.com/openai/codex/pull/1430
Based on the insights from
https://github.com/Homebrew/homebrew-core/pull/228521, I think those
were wrong and the real problem was this:
6dad5c3b17/.github/workflows/rust-release.yml (L162)
That is, I was manufacturing a new tag name on the fly instead of using
the existing one.
This PR reverts #1423 and #1430 and hopefully fixes how `tag_name` is
set for the `softprops/action-gh-release@v2` step so the **Source code
(tar.gz)** includes the correct files. Assuming this works, this should
make the Homebrew formula straightforward.
This commit is contained in:
@@ -28,19 +28,11 @@ else
|
||||
VERSION=$(printf '0.0.%d' "$(date +%y%m%d%H%M)")
|
||||
fi
|
||||
TAG="rust-v$VERSION"
|
||||
RELEASE_BRANCH="release/$TAG"
|
||||
|
||||
git checkout -b "$RELEASE_BRANCH"
|
||||
git checkout -b "$TAG"
|
||||
perl -i -pe "s/^version = \".*\"/version = \"$VERSION\"/" Cargo.toml
|
||||
git add Cargo.toml
|
||||
git commit -m "Release $VERSION"
|
||||
git tag -a "$TAG" -m "Release $VERSION"
|
||||
|
||||
# The commit identified by the tag must be reachable from a branch so that
|
||||
# when GitHub creates the `Source code (tar.gz)` for the release, it can find
|
||||
# the commit. This is a requirement for Homebrew to be able to install the
|
||||
# package from the tarball.
|
||||
git push origin "$RELEASE_BRANCH"
|
||||
git push origin "refs/tags/$TAG"
|
||||
|
||||
git checkout "$CURRENT_BRANCH"
|
||||
|
||||
Reference in New Issue
Block a user