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

How can I use tag message as description? #5

Closed
damirka opened this issue May 7, 2020 · 3 comments
Closed

How can I use tag message as description? #5

damirka opened this issue May 7, 2020 · 3 comments
Assignees

Comments

@damirka
Copy link

damirka commented May 7, 2020

Hello!

How can I use tag message (git tag -a v0.0.1 -m "message") as a description for my release? Does your action have this function?

@leycec
Copy link

leycec commented May 21, 2020

Coincidentally, that's exactly what I was grepping for. Sadly, this action only parsers release notes from CHANGELOG.md files. That's awkward, as changelogs are largely redundant in the git era. After all, git already provides a trivial changelog guaranteeably synchronized across all repository changes. It's called git log. Since we have git log, we don't need CHANGELOG.md. Don't Repeat Yourself (DRY), eh?

Like you and presumably most authors, I just embed release notes as annotated tag messages. Fortunately, the alternative create-release action already supports exactly that via the ${{ github.event.commits[0].message }} template variable, which GitHub Actions dynamically replaces with the message for the HEAD commit hopefully corresponding to this tag: e.g.,

      - id: github-release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Stable Release ${{ github.ref }}
          body: ${{ github.event.commits[0].message }}

Yes, that should be much better documented somewhere. Like, anywhere.

@damirka
Copy link
Author

damirka commented May 21, 2020

Hi @leycec! The day I wrote this issue I gave up googling for actions and decided to write my own Frankenstein. 😆 I agree with you, CHANGELOG does seem redundant in git, and I too prefer nice logs and tag messages.

If you're interested, my monster is here. It uses first line as H2 and everything below is parsed as regular markdown.

@Roang-zero1 Roang-zero1 self-assigned this Jun 27, 2022
Roang-zero1 added a commit that referenced this issue Jun 28, 2022
Roang-zero1 added a commit that referenced this issue Jun 28, 2022
@Roang-zero1
Copy link
Owner

Sorry for the huge delay in response and thanks for the input.
The latest version 2.3.0 now features a way to pass along a body text.

Coincidentally, that's exactly what I was grepping for. Sadly, this action only parsers release notes from CHANGELOG.md files. That's awkward, as changelogs are largely redundant in the git era. After all, git already provides a trivial changelog guaranteeably synchronized across all repository changes. It's called git log. Since we have git log, we don't need CHANGELOG.md. Don't Repeat Yourself (DRY), eh?

The reasoning for parsing the changelog was the integration with my other actions geared towards Factorio mods (https://github.com/Roang-zero1/factorio-mod-actions).
Due to the fact that these mods use the Changelog ingame it was the best source for the release messages.

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

No branches or pull requests

3 participants