Skip to content

Improve Release - Proper Tagging #2304

Closed

Description

@csviri

We discovered that during the release the tag that we create contains wrong version (the actual not the target release version), this does not make any functional problems, the code is the proper one, just the project version is set after GitHub Action receives the event, but the tag is already created that time.

Activity

  1. csviri commented on Mar 21, 2024

    @csviri
    CollaboratorAuthor

    One solution would be just simply tag the code during the release process, and replace the tag associated with the release with a proper one.

    It is really nice now, that the release is bound the the event of actually creating a release in GitHub.

  2. Lavanya-N24 commented on Aug 18, 2026

    @Lavanya-N24
    Contributor

    Hi @csvii, thank you for sharing these issues! I’d like to work on #2304 – Improve Release - Proper Tagging. I’ll take a look at the existing release workflow and investigate how the tagging can be corrected. Please let me know if there’s anything specific I should consider before starting.

  3. csviri commented on Aug 19, 2026

    @csviri
    CollaboratorAuthor

    Hi @Lavanya-N24 , thank you for picking this up, what we might consider is first creating a proof of concept PR, to test that the re-tagging works properly. So maybe you can check in a target repo, not that what we would do at the and is something:

    1. Creating a release (resource on Github) with a temp-tag, like 5.7.0-tmp (we are setting this tag manually when we create a release, so we are free to choose such name there now)
    2. the release workflow will update the version in pom files and push it to main (like 5.7.0)
    3. Will create the tag with this pushed commit (name of the tag v5.7.0)
    4. Will edit the release to point to this tag
    5. Do the rest, release, snapshot updated etc.

    Maybe you could test first the relevant scripts in other repo to see that everything works as it should

  4. Lavanya-N24 commented on Aug 19, 2026

    @Lavanya-N24
    Contributor

    Hi @csviri, thanks for the detailed steps! I’ll take a look at the release workflow and start with the proof-of-concept test you suggested.

  5. Lavanya-N24 commented on Sep 2, 2026

    @Lavanya-N24
    Contributor

    Hi @csviri,

    I have tested and verified the re-tagging workflow in a proof-of-concept repository:
    https://github.com/Lavanya-N24/release-tagging-poc

    Here is the flow tested and verified:

    1. Created a GitHub Release with a temporary tag (e.g., v1.0.0-tmp).
    2. The workflow triggers on the release published event, updates the POM version to 1.0.0, and pushes to the default branch (with a check to avoid crashing if there are no diffs).
    3. Creates and pushes the final tag (v1.0.0) pointing directly to that release commit.
    4. Updates the GitHub release to point to the new tag via gh release edit "$RAW_TAG" --tag "$FINAL_TAG".
    5. Deletes the temporary tag (v1.0.0-tmp).

    The final release and tag now cleanly point to the commit containing the release version without -SNAPSHOT.

    I will inspect the existing release workflow in this repository and prepare a PR adapting this approach.

  6. Lavanya-N24 commented on Sep 2, 2026

    @Lavanya-N24
    Contributor

    Hi @csviri, this PR is ready for review!

    It implements the release tagging fix discussed in #2304 using the temporary tag strategy, verified against the PoC repository: https://github.com/Lavanya-N24/release-tagging-poc.

    All bot review feedback regarding caller token permissions, explicit input passing to reusable workflows, injection-safe environment variable expansion, and post-deploy tag finalization has been addressed and consolidated into a single signed commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions