-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for migration to Maven Central
- Loading branch information
1 parent
c2bb746
commit 8045703
Showing
60 changed files
with
478 additions
and
360 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 |
---|---|---|
@@ -1,30 +1,58 @@ | ||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | ||
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path | ||
|
||
name: Maven Package | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
|
||
name: Release to Maven Central | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 1.8 | ||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | ||
settings-path: ${{ github.workspace }} # location for the settings.xml file | ||
|
||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
|
||
- name: Publish to GitHub Packages Apache Maven | ||
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml | ||
distribution: adopt | ||
java-version: 8 | ||
check-latest: true | ||
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml | ||
server-username: MAVEN_USERNAME # env variable for username in deploy | ||
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy | ||
settings-path: ${{ github.workspace }} | ||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2- | ||
- name: Build and publish to Maven Central | ||
run: > | ||
mvn | ||
--batch-mode | ||
--activate-profiles release | ||
--file pom.xml | ||
--settings $GITHUB_WORKSPACE/settings.xml | ||
clean | ||
deploy | ||
-Dmaven.install.skip=true | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
SIGN_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
SIGN_KEY_PASS: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} | ||
- name: Create an automatic release | ||
uses: marvinpinto/[email protected] | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
files: | | ||
- LICENSE.txt | ||
- README.md | ||
- *.jar | ||
- *.jar.asc |
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,24 +1,41 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Java CI with Maven | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
branches: | ||
- master | ||
pull_request: | ||
branches: [ master ] | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: adopt | ||
java-version: 8 | ||
check-latest: true | ||
settings-path: ${{ github.workspace }} | ||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
java-version: 1.8 | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2- | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
run: > | ||
mvn | ||
--batch-mode | ||
--activate-profiles ci | ||
--file pom.xml | ||
--settings $GITHUB_WORKSPACE/settings.xml | ||
clean | ||
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 |
---|---|---|
|
@@ -17,3 +17,7 @@ | |
# Other stuff | ||
*.bat | ||
target/ | ||
|
||
*.versionsBackup | ||
*.releaseBackup | ||
release.properties |
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
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
Oops, something went wrong.