Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Add a new workflow to generate release on tag push #164

Merged
merged 2 commits into from
Jan 9, 2023
Merged

Add a new workflow to generate release on tag push #164

merged 2 commits into from
Jan 9, 2023

Conversation

mihaimaruseac
Copy link
Contributor

This way, when running git push --tags, after appropriately tagging a commit as vx.y.z, a GitHub release page will be created titled vx.y.z (that is, the name of the tag) and with two pieces of contents:

  • the title and body of the tagged commit. This assumes that the commit message is properly sanitized, so its inclusion in the release page is worthwhile and/or informative
  • the changelog since the last tag, assuming semver

GitHub gives a higher priority to releases than to tags. Releases show up on the side of the repository, can have special triggers for workflows, can be subscribed to (so that downstream users will know to update). The last item is especially relevant since dependency update bots (e.g., Dependabot) can be configured to look for releases of GitHub actions used in the workflows of a repository and update them when these change. This is especially useful if the upstream actions are pinned by hash instead of by short tag name (as recommended by supply-chain security best guidelines -- not implemented here, as the goal is to follow the setup of the other actions).

Tested on https://github.com/mihaimaruseac/actions/releases

Prompted by discussion on #148, after closing.

Signed-off-by: Mihai Maruseac [email protected]

This way, when running `git push --tags`, after appropriately tagging a commit
as `vx.y.z`, a GitHub release page will be created titled `vx.y.z` (that is,
the name of the tag) and with two pieces of contents:

- the title and body of the tagged commit. This assumes that the commit message
  is properly sanitized, so its inclusion in the release page is worthwhile
  and/or informative
- the changelog since the last tag, assuming semver

GitHub gives a higher priority to releases than to tags. Releases show up on
the side of the repository, can have special triggers for workflows, can be
subscribed to (so that downstream users will know to update). The last item is
especially relevant since dependency update bots (e.g., Dependabot) can be
configured to look for releases of GitHub actions used in the workflows of a
repository and update them when these change. This is especially useful if
the upstream actions are pinned by hash instead of by short tag name (as
recommended by supply-chain security best guidelines -- not implemented here,
as the goal is to follow the setup of the other actions).

Tested on https://github.com/mihaimaruseac/actions/releases

Prompted by discussion on #148, after
closing.

Signed-off-by: Mihai Maruseac <[email protected]>
@andreasabel andreasabel added pr: squash-me re: releases Releasing the actions, tagging, changelog, etc. re: continuous integration (CI) Concerning continuous integration; services for quality assurance labels Jan 9, 2023
@andreasabel andreasabel self-assigned this Jan 9, 2023
@andreasabel andreasabel merged commit 545f4c5 into haskell:main Jan 9, 2023
@andreasabel
Copy link
Member

Thanks Mihai @mihaimaruseac!
I merged this quickly so that we can test it effectively.

@andreasabel
Copy link
Member

@mihaimaruseac : I like this "auto-release" workflow!

This is the first result: https://github.com/haskell/actions/releases/tag/v2.3.0
The release text was just the last commit, I edited it a bit, mostly deleting info that is irrelevant for the end-user.

Nice!

@mihaimaruseac
Copy link
Contributor Author

This is awesome!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: squash-me re: continuous integration (CI) Concerning continuous integration; services for quality assurance re: releases Releasing the actions, tagging, changelog, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants