-
Notifications
You must be signed in to change notification settings - Fork 10
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
Make releasing Alpha more convenient by adding gradle release plugin #359
Make releasing Alpha more convenient by adding gradle release plugin #359
Conversation
That's possible, but I think it would defeat the purpose of this PR (see below).
I don't see the trust issue. We use a fixed version of an established plugin (gradle release plugin in version 3.0.2) that we call through a validated instance of the gradle wrapper (ensured through wrapper validation action in the workflow). All the code executed during an automated release is publicly accessible and we can go through it with a fine-toothed comb anytime if we ever feel the need to. So, in my opinion the automated release using this workflow is about the safest possible way to do it and way more reliable than a human manually executing these steps.
For the sake of argument, let's lay out the workflow we'd get if we release through a separate branch. I'm assuming both Since the idea behind this PR was to get to a less cumbersome release process that does not involve pull requests and two people, I'd very much like to do it the way I suggested. |
@AntoniusW have you had a chance to think on how you'd like to move this forward |
Changed the PR to only include config for gradle release plugin since I didn't find any way to have a release workflow in github actions without creating a personal access token that would be tied to my own account (or one managed by me) with way more permissions than I feel comfortable with. |
@AntoniusW as discussed offline, I am merging this as-is in preparation for the next release of Alpha. |
Adds a basic configuration for the Gradle Release Plugin to
build.gradle.kts
. The release plugingradle.properties
to the value passed to the plugingradle.properties
ofmaster
branch to the next version passed to the pluginExample
Running
./gradlew release -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=0.7.0 -Prelease.newVersion=0.8.0-SNAPSHOT
would create a tag0.7.0
and set the version in master to0.8.0-SNAPSHOT
.The plugin will fail if it is run on a branch other than
master
or if there are unversioned files present in the working directory.Permissions
The release plugin requires permissions to directly push to the
master
branch. It can therefore only be run by users that are allowed to bypass the branch protection rule formaster
requiring approved pull requests to push. By default, these are repository admins and owners, including owners of the organization owning the repository (who are transitively repo owners).