spotify / github-java-client

A Java client to Github API
Apache License 2.0
129 stars 83 forks source link

cd: create GH Actions workflow to prepare release on dispatch #169

Closed felix-seifert closed 10 months ago

felix-seifert commented 10 months ago

With this PR, we step closer towards automating our release. I introduce the workflow prepare-release, which automates the steps which had to be performed locally before.

The workflow can be triggered as a workflow_dispatch together with selecting whether it is a PATCH, MINOR or MAJOR release. When triggered, it computes the necessary versions via the maven-version-determiner.py and calls mvn release:prepare with these versions.

As the Maven release plugin pushes commits during its prepare step, the action also tries to push to GitHub. To enable these pushes via the SSH connection, I use the foreign Action webfactory/ssh-agent. For this action, I generated an SSH keypair which I set as a deploy key and a secret.

The idea is that the workflow release picks up the new commits and publishes the build of the tagged commit as a new release on Maven Central.

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4a18372) 76.84% compared to head (f7e9f0e) 76.86%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #169 +/- ## ============================================ + Coverage 76.84% 76.86% +0.02% - Complexity 296 297 +1 ============================================ Files 42 42 Lines 1002 1003 +1 Branches 44 44 ============================================ + Hits 770 771 +1 Misses 207 207 Partials 25 25 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.