mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-26 11:07:48 +03:00
commit-ish doesn't include tags today
gh release --target only accepts a branch ref or a FULL sha hash, it doesn't accept tag names, which surprised us we tried writing a version where we just supply a sha hash instead of creating a tag and then passing the tag name to the workflow, but workflows can't be run on a sha hash, they can only be run on tags and branches. so we reverted to the original strategy of creating a tag locally and pushing it, and then starting the workflow with that tag, but then not referencing the tag for gh release, hoping that `${{github.sha}}` will work instead.
This commit is contained in:
parent
2caeffd2ea
commit
34e14899c4
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
gh release create "release/${{inputs.version}}" \
|
||||
--repo unisonweb/unison \
|
||||
--target "${{github.ref}}" \
|
||||
--target "${{github.sha}}" \
|
||||
--generate-notes \
|
||||
--notes-start-tag "${prev_tag}" \
|
||||
\
|
||||
|
@ -38,7 +38,7 @@ if ! [[ "$1" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
|
||||
fi
|
||||
|
||||
version="${1}"
|
||||
target=${2:-origin/trunk}
|
||||
src=${2:-origin/trunk}
|
||||
tag="release/$version"
|
||||
|
||||
echo "Creating release in unison-local-ui."
|
||||
@ -50,7 +50,7 @@ gh release create "release/${version}" \
|
||||
echo "Kicking off release workflow in unisonweb/unison"
|
||||
# Make sure our origin/trunk ref is up to date, since that's usually what gets tagged.
|
||||
git fetch origin trunk
|
||||
git tag "${tag}" "${target}"
|
||||
git tag "${tag}" "${src}"
|
||||
git push origin "${tag}"
|
||||
gh workflow run release --repo unisonweb/unison \
|
||||
--ref "${tag}" \
|
||||
|
Loading…
Reference in New Issue
Block a user