From 2535a1864508b8f27fb11d728581752034ce3f50 Mon Sep 17 00:00:00 2001 From: Yoav Bar-Zeev Date: Thu, 29 Feb 2024 19:59:58 +0200 Subject: [PATCH 1/3] Update GitHub Actions workflows --- .github/pull_request_template.md | 27 +++++++++++++ .github/release-drafter.yml | 56 +++++++++++++++++++++++++++ .github/workflows/maven.yml | 32 ++++++++------- .github/workflows/publish-maven.yml | 22 +++++++++++ .github/workflows/release-drafter.yml | 16 ++++++++ 5 files changed, 139 insertions(+), 14 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/publish-maven.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..1a508791 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,27 @@ +## Pull Request Description + +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes (link to the issue here) + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Chore / Documentation +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) + +## How Has This Been Tested? + +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration + +- [ ] Locally tested against Fireblocks API + +## Checklist: + +- [ ] I have performed a self-review of my own code +- [ ] I have made corresponding changes to the documentation +- [ ] Any dependent changes have been merged and published in downstream modules +- [ ] I have added corresponding labels to the PR diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 00000000..197fe048 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,56 @@ +name-template: 'v$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' +categories: + - title: '🚀 Features' + labels: + - 'feature' + - 'enhancement' + - title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: '🧰 Maintenance' + label: 'chore' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +version-resolver: + major: + labels: + - 'major' + - 'breaking' + minor: + labels: + - 'minor' + - 'enhancement' + patch: + labels: + - 'patch' + - 'bug' + default: patch +template: | + ## Changes + + $CHANGES +autolabeler: + - label: 'chore' + files: + - '*.md' + branch: + - '/docs{0,1}\/.+/' + - label: 'bug' + branch: + - '/fix\/.+/' + title: + - '/fix/i' + - '/bugfix/i' + - label: 'enhancement' + title: + - '/added/i' + - '/add/i' + - '/feature/i' + - '/feat/i' + - '/support/i' + - '/enable/i' + branch: + - '/feature\/.+/' diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index cfc6f1c6..b64636c9 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,22 +1,26 @@ name: Java CI with Maven on: - release: - types: [published] + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] jobs: - publish: + build: + name: Build Fireblocks API runs-on: ubuntu-latest - permissions: - contents: read - packages: write + strategy: + matrix: + java: [11, 17, 21] + distribution: [temurin, oracle] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v4 with: - java-version: '11' - distribution: 'temurin' - - name: Publish package - run: mvn --batch-mode deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + java-version: ${{ matrix.java }} + distribution: ${{ matrix.distribution }} + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml new file mode 100644 index 00000000..9c4395ff --- /dev/null +++ b/.github/workflows/publish-maven.yml @@ -0,0 +1,22 @@ +name: Publish Maven + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 00000000..ecba06c6 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,16 @@ +name: Release Drafter + +on: + push: + branches: + - master + pull_request: + types: [opened, reopened, synchronize] + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 17bd62e051fd12caccfdb33fec6f1496602ccbf2 Mon Sep 17 00:00:00 2001 From: Yoav Bar-Zeev Date: Thu, 29 Feb 2024 20:02:09 +0200 Subject: [PATCH 2/3] rename build workflow --- .github/workflows/{maven.yml => build-maven.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{maven.yml => build-maven.yml} (100%) diff --git a/.github/workflows/maven.yml b/.github/workflows/build-maven.yml similarity index 100% rename from .github/workflows/maven.yml rename to .github/workflows/build-maven.yml From ef87304dac7ff7e78b35f50abf1f166d735a229b Mon Sep 17 00:00:00 2001 From: Yoav Bar-Zeev Date: Thu, 29 Feb 2024 20:06:04 +0200 Subject: [PATCH 3/3] exclude Oracle JDK 11 build --- .github/workflows/build-maven.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-maven.yml b/.github/workflows/build-maven.yml index b64636c9..c4f4eaec 100644 --- a/.github/workflows/build-maven.yml +++ b/.github/workflows/build-maven.yml @@ -14,6 +14,10 @@ jobs: matrix: java: [11, 17, 21] distribution: [temurin, oracle] + exclude: + # Oracle JDK is only supported for JDK 17 and later + - java: 11 + distribution: oracle steps: - uses: actions/checkout@v4 - name: Set up JDK