-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
4 changed files
with
75 additions
and
56 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
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,50 +1,51 @@ | ||
name: Master branch | ||
name: Master or release candidate branch | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'release/*' | ||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
uses: actions/checkout@v1 | ||
|
||
- name: Cache .m2 | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Prepare mvnw | ||
run: chmod +x ./mvnw | ||
|
||
- name: Build | ||
run: ./mvnw clean package | ||
${{ runner.os }}-maven | ||
# Get GPG private key into GPG | ||
- name: Import GPG Owner Trust | ||
run: echo ${{secrets.GPG_OWNER_TRUST}} | base64 --decode | gpg --import-ownertrust | ||
|
||
run: echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --import-ownertrust | ||
- name: Import GPG key | ||
run: echo ${{secrets.GPG_SECRET_KEYS}} | base64 --decode | gpg --import --no-tty --batch --yes --always-trust | ||
|
||
- name: Clean settings.xml | ||
run: rm -rf ~/.m2/settings.xml | ||
run: echo ${{ secrets.GPG_SECRET_KEYS }} | base64 --decode | gpg --import --no-tty --batch --yes | ||
|
||
- name: Create settings.xml | ||
uses: s4u/maven-settings-action@v1 | ||
# Setup JDK and Maven | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
servers: '[{"id": "ossrh", "username": "${{secrets.SONATYPE_USERNAME}}", "password": "${{secrets.SONATYPE_PASSWORD}}"}]' | ||
java-version: 11.0.5 | ||
server-id: ossrh | ||
server-username: OSS_CENTRAL_USERNAME # env variable for Maven Central | ||
server-password: OSS_CENTRAL_PASSWORD # env variable for Maven Central | ||
|
||
- name: Prepare Maven Wrapper | ||
run: chmod +x ./mvnw | ||
|
||
- name: Build with Maven | ||
run: ./mvnw clean verify -U -B -T4 | ||
|
||
- name: Deploy a new version to central | ||
run: ./mvnw clean deploy -B -DskipTests -DskipExamples -Prelease -Dgpg.keyname=${{secrets.GPG_KEYNAME}} -Dgpg.passphrase=${{secrets.GPG_PASSPHRASE}} | ||
run: ./mvnw clean deploy -B -DskipTests -DskipExamples -Prelease -Dgpg.keyname=${{secrets.GPG_KEYNAME}} -Dgpg.passphrase="${{secrets.GPG_PASSPHRASE}}" | ||
env: | ||
OSS_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
OSS_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_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
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