TBD54566975 / web5-kt

Apache License 2.0
7 stars 9 forks source link

Fix release pipeline to work with branch protections #296

Closed ALRubinger closed 3 months ago

ALRubinger commented 3 months ago

The release.yml workflow relies on the Maven Release Plugin to push commits to main. It does this using the https://github.com/tbd-releases account. Because of branch protections and the way we cannot bypass them in GitHub configs, we have to adapt the release workflow to initiatlize the release process off a branch, push changes to that branch, create a PR, then merge that PR/branch back into main.

ALRubinger commented 3 months ago

WIP in issue-296/release-with-branch-protections

ALRubinger commented 3 months ago

Also WIP for testing in https://github.com/ALRubinger/web5-kt.

To be ported upstream when working there.

ALRubinger commented 3 months ago

Using prerelease branch to stage release commits looks good so far:

Version to be released: 1.0.0-maven-rc-3
Setting next development version back to original in pom.xml: 0.0.0-main-SNAPSHOT
Staging release commits in branch: prerelease-c85ccd9-1.0.0-maven-rc-3
Switched to a new branch 'prerelease-c85ccd9-1.0.0-maven-rc-3'

https://github.com/ALRubinger/web5-kt/actions/runs/8592653569/job/23542981631#step:6:48

ALRubinger commented 3 months ago

Excellent, release commits nicely seated in a branch:

https://github.com/ALRubinger/web5-kt/commits/prerelease-c85ccd9-1.0.0-maven-rc-3/

Now to use GH REST API to make a PR and merge it into main so branch protections are honored.

ALRubinger commented 3 months ago

Replaced by #297 - no more work to be done here.