R2Northstar / Northstar

Repo for packaged Northstar releases
https://northstar.tf/
MIT License
1.69k stars 131 forks source link

Improve release workflow for faster and smaller releases #431

Open GeckoEidechse opened 1 year ago

GeckoEidechse commented 1 year ago

Introduction

In cases where you cannot 100% guarantee code correctness (i.e. for most code projects), having a fast feedback loop helps a lot with catching bugs/regressions introduced by code changes.

As such if we could improve our release workflow, we could in turn use it to reduce the friction for merging PRs.

Problem

Currently, I'm the sole person doing releases. To create a release from start to finish I have to:

  1. Go through commits to see what's (not) breaking
  2. Push the right commits, to MAJOR.MINOR.X branch
  3. Write up release notes (I got that semi-automated in FlightCore now) and save them in draft notes
  4. Push up tags for each repo
  5. Wait for release repo to build (~5min)
  6. Download CI build
  7. Create release on GitHub (making sure to upload CI build, copying text from draft, making sure to click all the right buttons)
  8. Make server hoster bug report channel
  9. Drop message for server hosters
  10. Drop message for modders
  11. Drop message for rest of people in announcements.
  12. Get @pg9182 to make updated docker image

Obviously that's a lot of steps and most of this can and should be automated to reduce the effort in creating a release and as such enable creating releases faster.

Overall it takes me around at least 30 minutes to make a release assuming I already got the selecting commits part sorted.

Solution

The solution is "simple": Automation 🤖

Automate as much as possible to reduce the overall workflow to simple selecting commits and making tags.

This also goes beyond just the steps listed above. For example by introducing players to updating using a mod-manager we can also ensure that not only do we often create releases but also that those releases do get deployed to players.

Roadmap

In no particular order a bunch of TODOs on the way of a faster release workflow:

GeckoEidechse commented 1 year ago

For pulling pre-built NorthstarLauncher.exe from Launcher repo, the easiest solution seems to be to publish it as a release: https://stackoverflow.com/questions/70572469/get-artifact-from-other-repo

This does have the drawback that one has to create releases on Launcher repo now as well as that there 100% will be some players that try to install the Launcher build instead of the release build but as it allows for "parallelising" the release workflow, i.e. tag and push launcher first, then the rest and by the time the main release is being built, NorthstarLauncher CI job should already be finished, it's worth the drawbacks IMO.