-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for floating the
v1
tag to the latest release
This adds a workflow for floating the `v1` tag to the latest release. This way we reduce the chance of someone fat-fingering the necessary `git` commands.
- Loading branch information
1 parent
86de090
commit 160adf6
Showing
3 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release - Move Tracking Tag | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
Move-Tracking-Tag-To-Latest-Release: | ||
runs-on: ubuntu-latest | ||
|
||
# TODO: Should we filter this job...? Ie, what if the new release isn't a | ||
# version? Or if it's an older patch version rather than a newer one? | ||
# The logic gets tricky quickly... so IMO either we assume every new release | ||
# is newest and always bump on release publish, or we switch to letting letting the | ||
# release author decide by switching this to using `workflow_dispatch` and | ||
# requiring a human to manually run this workflow after they tag a release. | ||
# Safer, but more of a hassle and also an unnecessary precaution 99% of the time. | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.DEPENDABOT_AUTOMATION_PAT }} | ||
|
||
- name: Move the tracking tag | ||
run: git tag -f v1 | ||
|
||
- name: Push the new tag value back to the repo | ||
run: git push -f origin refs/tags/v1 | ||
|
||
- name: Set summary | ||
run: | | ||
echo ":rocket: Successfully moved the \`v1\` tag to point at release: ${{ github.event.release.name }} with SHA: \`$GITHUB_SHA\`." >> $GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters