Skip to content

Support tag in GH action config #906

Closed

Description

@rantoniuk

--commit and --tag are supported separately, i.e. I can run a release on a non-PyPi project that does not require any source code changes and just create a tag and pushing it when doing a release.

This is possible in the tool:
https://python-semantic-release.readthedocs.io/en/latest/commands.html#tag-no-tag

but it's not possible in GH action, as there is only commit option available:
https://github.com/python-semantic-release/python-semantic-release/blob/master/action.yml#L53
and no tag option.

Activity

  1. added
    feature
    on May 1, 2024
  2. changed the title [-]Add tag in GH action configs[/-] [+]Support tag in GH action config[/+] on May 1, 2024
  3. self-assigned this
    on May 1, 2024
  4. codejedi365 commented on May 1, 2024

    @codejedi365
    Contributor

    That is a good catch, thank you. I did need to up date it. It is not easy keeping up with the action config as there isn't real testing for it.

  5. added a commit that references this issue on May 1, 2024
    81ea92b
  6. codejedi365 commented on May 2, 2024

    @codejedi365
    Contributor

    @rantoniuk , would you try out this fix and see if it works for you?

    jobs:
      release:
        runs-on: ubuntu-latest
        concurrency: release
        permissions:
          id-token: write
          contents: write
    
        steps:
        - uses: actions/checkout@v3
          with:
            fetch-depth: 0
    
        - name: Python Semantic Release
          uses: codejedi365/python-semantic-release@fix/gha-missing-tag-option
          with:
            github_token: ${{ secrets.GITHUB_TOKEN }}
            commit: false
            tag: true
            # ...
  7. added
    awaiting-reply
    on May 3, 2024
  8. rantoniuk commented on May 3, 2024

    @rantoniuk
    Author

    Thanks for quick reply. Actually I tested it using the current version and it works without that patch as expected, i.e. it creates a tag but does not push any commits.
    I left a PR comment as well :)

  9. codejedi365 commented on May 3, 2024

    @codejedi365
    Contributor

    I left a PR comment as well :)

    Thank you!

    Actually I tested it using the current version and it works without that patch as expected, i.e. it creates a tag but does not push any commits.

    I realize now that really it's because the default is --commit and --tag. If you just turn off commit with commit: false then it is implicitly --tag, but there is no explicit option to toggle the tag flag via the GitHub Action until my PR. So the PR gives the explicit ability to toggle the tag and commit options separately.

  10. added 3 commits that reference this issue on May 3, 2024
    96f26e5
    54e765a
    f4276a2
  11. added a commit that references this issue on May 5, 2024
    6b24288
  12. added and removed
    awaiting-reply
    on May 6, 2024
  13. codejedi365 commented on May 6, 2024

    @codejedi365
    Contributor

    🎉 This issue has been resolved in version 9.7.0 🎉

    The release is available on:

  14. rantoniuk commented on May 6, 2024

    @rantoniuk
    Author

    @codejedi365 thanks for swift action!

    Quick question, how do you auto-comment the related github issues to add the release information (above)? I looked at your github workflows but I don't see anything related to this and this is a very useful thing!

  15. codejedi365 commented on May 6, 2024

    @codejedi365
    Contributor

    Quick question, how do you auto-comment the related github issues to add the release information (above)?

    Manual copy and paste! lol!

    I copied the template from the JS version of semantic-release, which auto-posts messages like these for all issues that were resolved, because of how awesome it is. One day, PSR will too.

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

Metadata

Metadata

Assignees

Labels

featurereleased

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions