-
Notifications
You must be signed in to change notification settings - Fork 0
ci: workflow handle carrying major tag forth #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,13 @@ jobs: | |
| ref: ${{ github.event.pull_request.merge_commit_sha }} | ||
| fetch-depth: 0 | ||
| - uses: ./ | ||
| id: release | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| draft-release: false | ||
| - name: Update floating major tag | ||
| if: steps.release.outputs.tag | ||
| run: | | ||
| major=$(echo "${{ steps.release.outputs.tag }}" | grep -oE '^v[0-9]+') | ||
| git tag -f "$major" "${{ steps.release.outputs.tag }}" | ||
| git push origin "$major" --force | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
steps.release.outputs.tagis created as an annotated tag (seescripts/finalize-release.sh), sogit tag -f "$major" "${{ steps.release.outputs.tag }}"will make the floating major tag point to the tag object rather than the underlying commit (a tag-of-a-tag). This can confuse tooling that expects the ref to resolve directly to a commit; peel the tag to its commit (e.g., dereference to the tagged commit) before retagging.