Skip to content

Commit 8166ccc

Browse files
committed
publish-to-github.sh: specify commit ID for new releases
Ensures that the release is bound to the correct commit, not to the main branch, which typically is still behind at the time of publishing.
1 parent 44acb63 commit 8166ccc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ci/publish-to-github.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ if gh release view --repo "${github_repo}" "${github_tag}"; then
9191
fi
9292
else
9393
echo "No release found for '${github_tag}'; creating a new release draft..."
94+
commit_id=$(git rev-parse HEAD)
95+
echo "Using commit ID (this commit must also exist in GitHub): $commit_id"
9496
gh release create --draft --repo "${github_repo}" "${github_tag}" \
97+
--target "${commit_id}" \
9598
--title "ObjectBox Generator ${github_tag}" \
9699
--notes "See CHANGELOG.md for details."
97100
echo "Uploading artifacts to new release draft..."

0 commit comments

Comments
 (0)