-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add release plz Signed-off-by: Todd Baert <[email protected]> * Update release doc Signed-off-by: Todd Baert <[email protected]> * Add notes about adding release content Signed-off-by: Todd Baert <[email protected]> Signed-off-by: Todd Baert <[email protected]>
- Loading branch information
Showing
9 changed files
with
95 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Lint PR' | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,52 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created | ||
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle | ||
|
||
# maven deploy commands via via https://tech.clevertap.com/automate-releases-to-maven-central-via-github-actions/ | ||
|
||
name: Release | ||
# This workflow creates a running release please PR, which tracks all changes | ||
# based on semantic PR titles. When that PR is merged, a publish occurs after | ||
# release please increments the version. | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
push: | ||
branches: | ||
- main | ||
name: Run Release Please | ||
jobs: | ||
build: | ||
|
||
release-please: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
# Release-please creates a PR that tracks all changes | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 8 | ||
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 | ||
run: | | ||
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import | ||
env: | ||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | ||
|
||
- name: Remove SNAPSHOT | ||
run: mvn versions:set -DremoveSnapshot | ||
|
||
- name: Deploy | ||
run: | | ||
mvn --batch-mode \ | ||
--settings release/m2-settings.xml clean deploy | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
command: manifest | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
default-branch: main | ||
|
||
# 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,11 @@ | ||
This is a simple checklist when performing a release. | ||
# Releases | ||
|
||
1. Ensure we're up-to-date with the current spec via `./spec_finder.py --diff-output --refresh-spec` | ||
2. Update `README.md` with the current spec that we're up to | ||
3. Update `README.md` to keep the install instructions on the right version | ||
4. Update `<version>` in pom.xml | ||
5. Run `mvn verify` to ensure it all works. | ||
6. Commit the results as the new version. | ||
This repo uses _Release Please_ to release packages. Release Please sets up a running PR that tracks all changes in the library, and maintains the versions according to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), generated when [PRs are merged](https://github.com/amannn/action-semantic-pull-request), based on the PR title. The semantics of the PR title are enforced by the `lint-pr.yml` workflow. When Release Please's running PR is merged, a new release is created, and the associated artifacts are published. | ||
|
||
Then in GitHub, trigger a release. | ||
## Customization of changelog and release notes. | ||
|
||
1. Go to [github releases](https://github.com/open-feature/java-sdk/releases/new) | ||
2. Name a tag w/ the version you want to release (e.g. `0.1.0`) | ||
3. Click the generate release notes button and write some text about what actually changed. | ||
4. Submit | ||
5. Validate the action which builds the result happened correctly. | ||
If you'd like to add custom content to a release, you can do this by editing the content in a Release Please PR's description. This content will be added to the notes for that release. If you'd like to add content to the changelog, simply push updates to the changelog in the Release Please PR. | ||
|
||
If something went wrong above, here's how you reset. | ||
1. Save the release notes you wrote. | ||
2. Delete the release. | ||
3. Delete the tag with `git push --delete origin 0.1.0` where 0.1.0 is your tag name. | ||
## Configuration | ||
|
||
```shell | ||
gh release delete 0.1.0 -y | ||
git push --delete origin 0.1.0 | ||
|
||
gh release create 0.1.0 -F /tmp/010-release.md -t 0.1.0 | ||
``` | ||
The `release-please-config.json` defines the release please configuration. See schema [here](https://github.com/googleapis/release-please/blob/main/schemas/config.json) to understand all the options. We use the "simple" release strategy and annotate the POM with an element to help release please find the correct XML entity to update (the version element). Release Please stores it's understanding of the current version in the `version.txt` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"bootstrap-sha": "c701a6c4ebbe1170a25ca7636a31508b9628831c", | ||
"packages": { | ||
".": { | ||
"package-name": "dev.openfeature.javasdk", | ||
"release-type": "simple", | ||
"bump-minor-pre-major": true, | ||
"bump-patch-for-minor-pre-major": true, | ||
"versioning": "default", | ||
"extra-files": [ | ||
"pom.xml" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.1 |