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

Create a release GH workflow #250

Open
displague opened this issue Mar 26, 2021 · 3 comments
Open

Create a release GH workflow #250

displague opened this issue Mar 26, 2021 · 3 comments

Comments

@displague
Copy link
Member

In order to avoid situations like #249, GH workflows should be used to tag new releases.

The release workflow should take a semver version, update libraryVersion in packngo.go, and tag the release.

Moreover, the RELEASE.md steps should be followed in the GH workflow, and the RELEASE.md should be updated to tell maintainers to dispatch the GH workflow.

@t0mk
Copy link
Contributor

t0mk commented Mar 29, 2021

@displague
Copy link
Member Author

displague commented Mar 29, 2021

If we use release-drafter, we will need a job in that workflow that runs just before release-drafter to do the version bump.

While we are at it, we could change const libraryVersion in packngo.goto var Version in version.go, this will make it easier to replace in automation, make the variable available to users, and make the variable something we can change at build time if needed.

I was thinking that the version + release would be part of a dispatched action, with prompts. ("What version do you want to release?" "What commish (default: master)?".

If we have to push a tag to master manually for release-drafter to trigger, we'll be just as likely to forget to update the version stamp.


A simple solution might be to use version.go (as above) and have make release attempt to tag a release using the version
from that file. If the tag already exists, make release would fail.


I think I still prefer an automated workflow, we can likely make it smarter and take hints about what version to deploy. Maybe we need to keep "v0.8.0-beta" (where 8 is +1 of the current release) in version.go. Automation can remove the beta on release and then increment the number on the commit that follows the release.

@displague
Copy link
Member Author

Since #281, we don't need to update the version stored in version.go.

This means that tags can be applied at any time, using the GH UI. Release automation would be beneficial for drafting release notes. For this, we should consider workflows that parse well-formatted commit messages and perhaps try to enforce that commit format to some extent.

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

2 participants