GoogleCloudPlatform / functions-framework-java

FaaS (Function as a service) framework for writing portable Java functions
Apache License 2.0
135 stars 65 forks source link

chore: setup Release Please #148

Closed anniefu closed 2 years ago

anniefu commented 2 years ago

This creates PRs that can be merged to create GitHub Releases for each of the components of Functions Framework Java.

Every release creates two PRs:

  1. A "release" PR (example) that updates the pom.xml with the next major version number
  2. Once that is merged, a "snapshot" PR (example) that updates the pom.xml with a snapshot version number for the next development iteration

The PRs need to be merged manually.

jihuin commented 2 years ago

The example release PR updated the minor version. Is it possible to release patch version every time?

kappratiksha commented 2 years ago

The first PR should just remove the word "SNAPSHOT" from the version and not change any numbers and the second one should update the number and add the word "SNAPSHOT", right? Or am I missing anything?

jihuin commented 2 years ago

The first PR should just remove the word "SNAPSHOT" from the version and not change any numbers and the second one should update the number and add the word "SNAPSHOT", right? Or am I missing anything?

That's also my understanding.

anniefu commented 2 years ago

Release please uses conventional commits to determine the correct semantic version of the next release: https://github.com/googleapis/release-please#how-should-i-write-my-commits

The two example PRs in the description were formed using fake feat: or fix: commits for testing, and they are for differnet components with unrelated version numbers. Release PRs remove the "SNAPSHOT" as expected, and can also increment the semantic version as appropriate based off conventional commits.

The second "snapshot" commit will always just do a patch increment and add "-SNAPSHOT" again. The version for the next release will be determined by the next "release" PR.

"release" PRs are constantly updated by the Release Please bot based off new commits to master.