Skip to content
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

feat: enable shorthand vX tags inherited from latest version #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HassanBahati
Copy link
Contributor

@HassanBahati HassanBahati commented Nov 17, 2024

Currently to use the action you need to define the full version version eg v1.0.0 resulting into invertase/[email protected].

This PR enables usage of vX where X is any major release tag. Resulting into, for example; invertase/firebase-emulator-action@v1

I have tested out this approach via custom-short-hand-tag.yaml for HassanBahati/demo-script-action@v1
image

@HassanBahati HassanBahati changed the title feat: enable shorthand vX tags inherited from major latest version feat: enable shorthand vX tags inherited from latest version Nov 17, 2024
Copy link

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that should do it

run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -fa ${{ steps.get_version.outputs.major_version }} -m "Update major version tag to ${{ steps.get_version.outputs.full_version }}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never made an annotated tag (-a) but -f looks like the way to push that semver major tag up along the releases to the current code, so +1


       -a, --annotate
           Make an unsigned, annotated tag object

       -s, --sign
           Make a GPG-signed tag, using the default e-mail address’s key. The
           default behavior of tag GPG-signing is controlled by tag.gpgSign
           configuration variable if it exists, or disabled otherwise. See
           git-config(1).

       --no-sign
           Override tag.gpgSign configuration variable that is set to force
           each and every tag to be signed.

       -u <key-id>, --local-user=<key-id>
           Make a GPG-signed tag, using the given key.

       -f, --force
           Replace an existing tag with the given name (instead of failing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants