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

ci: Automate patch releases and pre-releases #3485

Merged
merged 1 commit into from
May 4, 2024

Conversation

wolfgangwalther
Copy link
Member

This work by automatically pushing a new tag on main and release branches after each commit. The tag will be "devel" on main and the version from postgrest.cabal for release branches. The release workflow then runs as a tag pipeline, making the actual release.

For release branches, the tag will only be created if a tag for this version doesn't exist, yet. This means to actually make a new patch release, we still need to bump the version in postgrest.cabal. We can automate this later as part of our backport-bot.

Resolves #2006
Resolves #2997


This PR should support both nightly devel releases as well as patch releases on older branches. Before it will do the latter, though, it would need to be backported to v12 - or we'd need to make a minor release first. Either of the two will work.

I have tested this as much as I can on the main branch of my personal fork. This doesn't fully go through the release, because I don't have all the pieces (github, docker, tokens, etc.) in place. I will now merge this to postgrest/main and then see what kind of adjustments we still need to make.

This work by automatically pushing a new tag on main and release
branches after each commit. The tag will be "devel" on main and the
version from postgrest.cabal for release branches. The release
workflow then runs as a tag pipeline, making the actual release.

For release branches, the tag will only be created if a tag for this
version doesn't exist, yet. This means to actually make a new patch
release, we still need to bump the version in postgrest.cabal. We
can automate this later as part of our backport-bot.

Resolves PostgREST#2006
Resolves PostgREST#2997
@wolfgangwalther wolfgangwalther merged commit dd8d51a into PostgREST:main May 4, 2024
9 of 11 checks passed
@wolfgangwalther wolfgangwalther deleted the release branch May 4, 2024 18:42
@wolfgangwalther
Copy link
Member Author

As expected, a few things didn't work out of the box. I fixed the following issues directly on main:

  • fe0f2f7 - the first "devel" pre-release had the commit title as the release title, which I replaced with just a "devel" title.
  • 58d8133 - variables for DOCKER_USER and DOCKER_REPO were not set up correctly, which I fixed in the repo settings and passed to the docker job correctly.
  • 9fe90bf - after enabling docker, the arm tags were messed up. This caused the postgrest:latest tag to temporarily have another image for arm added, with the latest devel version. I fixed that manually by pushing the v12.0.2 tag to postgrest:latest again and then fixed the code, so that it should now work correctly.
  • eec35d4 - to avoid getting a new notification for each new devel release (i.e. each commit to main), I changed the "delete and recreate" logic for releases to "edit existing release" for the devel release. This should avoid additional notifications.

I also tried my luck with enabling the automatic update of docker hub descriptions again (2f98d83). Let's see how that goes.

@wolfgangwalther
Copy link
Member Author

I also tried my luck with enabling the automatic update of docker hub descriptions again (2f98d83). Let's see how that goes.

This works, but I will need to fix a few of the other things in the next couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Revive nightly builds Push docker image after every commit to main?
1 participant