-
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.
Merge branch 'main' into static-scanning
- Loading branch information
Showing
46 changed files
with
1,144 additions
and
245 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
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,68 +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 | ||
gpg --list-secret-keys --keyid-format LONG | ||
env: | ||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | ||
|
||
- name: Build with Maven | ||
run: | | ||
mvn --batch-mode --update-snapshots verify gpg:sign -Dversion.modifier='' | ||
ls | ||
ls * | ||
gpg --verify target/javasdk-0.1.0-sources.jar.asc target/javasdk-0.1.0-sources.jar | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
flags: unittests # optional | ||
name: coverage # optional | ||
fail_ci_if_error: true # optional (default = false) | ||
verbose: true # optional (default = false) | ||
|
||
- name: Deploy | ||
run: | | ||
gpg --verify target/javasdk-0.1.0-sources.jar.asc target/javasdk-0.1.0-sources.jar | ||
mvn -P gpg_verify \ | ||
--no-transfer-progress \ | ||
--batch-mode \ | ||
--file pom.xml -s release/m2-settings.xml deploy -Dversion.modifier='' | ||
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,3 @@ | ||
[submodule "test-harness"] | ||
path = test-harness | ||
url = https://github.com/open-feature/test-harness |
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.2.2"} |
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,29 @@ | ||
# Changelog | ||
|
||
## [0.2.2](https://github.com/open-feature/java-sdk/compare/dev.openfeature.javasdk-v0.2.1...dev.openfeature.javasdk-v0.2.2) (2022-09-20) | ||
|
||
|
||
### Features | ||
|
||
* Add asObjectMap to get the EvaluationContext as Map<String,Object> ([#75](https://github.com/open-feature/java-sdk/issues/75)) ([2eec1a5](https://github.com/open-feature/java-sdk/commit/2eec1a5519b9efab7d7f9dc8b1cbd84d9218368b)) | ||
|
||
## [0.2.1](https://github.com/open-feature/java-sdk/compare/dev.openfeature.javasdk-v0.2.0...dev.openfeature.javasdk-v0.2.1) (2022-09-13) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* isList check in Value checks type of list ([#70](https://github.com/open-feature/java-sdk/issues/70)) ([81ab071](https://github.com/open-feature/java-sdk/commit/81ab0710ea56af65eb65c7f95832b8f58c559a51)) | ||
|
||
## [0.2.0](https://github.com/open-feature/java-sdk/compare/dev.openfeature.javasdk-v0.1.1...dev.openfeature.javasdk-v0.2.0) (2022-09-13) | ||
|
||
|
||
### ⚠ BREAKING CHANGES | ||
|
||
* use value for object resolver | ||
* use instant not zoneddatetime | ||
|
||
### Features | ||
|
||
* add object to value wrapper ([0152a1e](https://github.com/open-feature/java-sdk/commit/0152a1eef93ea1b5253ddae78718a9805c98aaf7)) | ||
* use instant not zoneddatetime ([3e62414](https://github.com/open-feature/java-sdk/commit/3e6241422266825f267043e4acd116803c4939b0)) | ||
* use value for object resolver ([5d26247](https://github.com/open-feature/java-sdk/commit/5d262470e8ec47d2af35f0aabe55e8c969e992ac)) |
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 @@ | ||
@open-feature/java-maintainers |
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
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. |
Oops, something went wrong.