-
Notifications
You must be signed in to change notification settings - Fork 43
chore: Add release plz #66
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
Conversation
Signed-off-by: Todd Baert <toddbaert@gmail.com>
ce4d983
to
ca31cde
Compare
|
||
# Add -SNAPSHOT before deploy | ||
- name: Add SNAPSHOT | ||
run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer maintain -SNAPSHOT
in the POM because Release Please will delete -SNAPSHOT
every time it increments. So now instead we just add -SNAPSHOT
in non-release builds dynamically.
Codecov Report
@@ Coverage Diff @@
## main #66 +/- ##
=========================================
Coverage 91.27% 91.27%
Complexity 159 159
=========================================
Files 19 19
Lines 344 344
Branches 14 14
=========================================
Hits 314 314
Misses 21 21
Partials 9 9
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
# These steps are only run if this was a merged release-please PR | ||
- name: checkout | ||
if: ${{ steps.release.outputs.releases_created }} | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK 8 | ||
if: ${{ steps.release.outputs.releases_created }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: maven | ||
server-id: ossrh | ||
server-username: ${{ secrets.OSSRH_USERNAME }} | ||
server-password: ${{ secrets.OSSRH_PASSWORD }} | ||
|
||
- name: Configure GPG Key | ||
if: ${{ steps.release.outputs.releases_created }} | ||
run: | | ||
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import | ||
env: | ||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | ||
|
||
- name: Deploy | ||
if: ${{ steps.release.outputs.releases_created }} | ||
run: | | ||
mvn --batch-mode \ | ||
--settings release/m2-settings.xml clean deploy | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is basically the same release process as before, just with all steps conditional on ${{ steps.release.outputs.releases_created }}
(meaning this is a merged release plz PR).
@@ -4,7 +4,7 @@ | |||
|
|||
<groupId>dev.openfeature</groupId> | |||
<artifactId>javasdk</artifactId> | |||
<version>0.1.1-SNAPSHOT</version> | |||
<version>0.1.1</version> <!--x-release-please-version --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tells release plz to correctly increment this version.
"bump-minor-pre-major": true, | ||
"bump-patch-for-minor-pre-major": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These settings treat the minor
version as the breaking indicator when we are at version < 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Please add info about how releaseplz works to a README somewhere.
Signed-off-by: Todd Baert <toddbaert@gmail.com>
Done. I've updated the release doc you wrote to explain release please and linked to it from the main readme. |
Signed-off-by: Todd Baert <toddbaert@gmail.com>
43959a3
to
2a1cf5b
Compare
This add's release please, a means of transparently keeping track of pending code to release, and auto-incrementing versions.
The
lint-pr.yml
workflow enforces semantically-titled PRs, which become the commit message after any merge. The release please action then maintains an open PR of changes (see example here in node-contribs). When this is merged, release plz runs the same publish functionality as before. It also generates release notes automatically and creates a github release.