-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Henry Coles
committed
Mar 19, 2021
1 parent
dc1084c
commit f55a0a3
Showing
5 changed files
with
153 additions
and
15 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,40 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
branches-ignore: | ||
- 'release' | ||
jobs: | ||
supported-jdk: | ||
name: ${{ matrix.title }} | ||
continue-on-error: false | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- title: "JDK 8" | ||
java: 8 | ||
- title: "JDK 11" | ||
java: 11 | ||
- title: "JDK 16" | ||
java: "16-ea" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout from Git' | ||
uses: actions/checkout@v2 | ||
- name: 'Set up JDK ${{ matrix.java }}' | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
- name: 'Display JDK version' | ||
run: java -version | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-maven- | ||
- name: 'Test' | ||
run: mvn -B verify |
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,44 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- release/** | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
# sonatype nexus sometimes hangs | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" | ||
id: extract_branch | ||
- name: Install gpg secret key | ||
run: | | ||
cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import | ||
gpg --list-secret-keys --keyid-format LONG | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-maven- | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v1.4.3 | ||
with: | ||
java-version: 8 | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- name: Configure Git user | ||
run: | | ||
git config user.email "actions@github.com" | ||
git config user.name "GitHub Actions" | ||
- name: Publish JAR | ||
run: mvn -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE}} -B -Prelease deploy scm:tag -Drevision=${{ steps.extract_branch.outputs.branch }} -DskipTests=true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Deploy snapshot | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
snapshot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-maven- | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v1.4.3 | ||
with: | ||
java-version: 8 | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- name: Publish JARs | ||
run: mvn -B deploy -DskipTests=true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
### Maven ### | ||
dependency-reduced-pom.xml | ||
/target/ | ||
.flattened-pom.xml | ||
|
||
### STS ### | ||
.apt_generated | ||
|
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