Merge pull request #6 from infor-cloud/AddMissingAPIs #13
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
name: Java CD | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Set up GPG | |
run: | | |
echo "$GPG_PRIVATE_KEY" > private.asc | |
gpg --import --batch private.asc | |
env: | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
- name: Configure Git | |
run: | | |
git config --global user.name "XtendM3" | |
git config --global user.email "[email protected]" | |
- name: Build with Maven | |
run: mvn -B gitflow:release -DpostReleaseGoals="clean deploy" -DargLine="-P release -Dgpg.passphrase=${GPG_PASSWORD}" | |
env: | |
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 |