-
Notifications
You must be signed in to change notification settings - Fork 379
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
GitHub Actions Stickiness Major Tagging #288
Comments
Its definitely a feature request. In the meantime you can do it like this. |
Thanks! I got it working with this - name: Bump version and push tag
id: bump-version
uses: anothrNick/github-tag-action@a2c70ae13a881faf2b4953baaa9e49731997ab36 # 1.67.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- name: Extract major tag
id: extract-major
run: >-
echo major_tag=$(echo ${{ steps.bump-version.outputs.new_tag }} |
cut -d'.' -f1) >> $GITHUB_OUTPUT
# this is done manually as need a non-annotated tag
# TODO: replace with https://github.com/actions/publish-action
- name: Update major tag
run: |-
git config user.name github-actions
git config user.email github-actions@github.com
git tag --force ${{ steps.extract-major.outputs.major_tag }} \
${{ steps.bump-version.outputs.new_tag }}
git push origin ${{ steps.extract-major.outputs.major_tag }} --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to #280 (but think a more simple request).
I would like to bump my repo in the standard
minor
fashion, however I'd also like to update themajor
version (/create if it doesn't exist). This is the pattern used by various GitHub Actions (likeactions/checkout
).So when I go from
v0.0.0
→v0.0.1
,v0
would now linkv0.0.1
. Then later onev0.0.2
gets made, andv0
now points tov0.0.2
. At some pointv1.0.0
gets made,v1
gets created and now points tov1.0.0
etc. Thanks!The text was updated successfully, but these errors were encountered: