Roang-zero1/github-create-release-action

How can I use tag message as description?

Closed this issue · 3 comments

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?

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.

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.

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.