[maven-release-plugin] prepare release xs2a-client-adapter-1.3.12.1 #2
Workflow file for this run
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: Release CI | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
env: | |
GPG_EXECUTABLE: ${{ secrets.GPG_EXECUTABLE }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
jobs: | |
build_and_test: | |
name: Build and test xs2a-client-adapter (openjdk 1.11) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone xs2a-client-adapter repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 11 for x64 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.11 | |
architecture: x64 | |
- 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 xs2a-client-adapter | |
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -V -q | |
- name: Run Unit Tests | |
run: mvn clean test -B -V -q | |
deploy: | |
name: Release to maven central | |
needs: build_and_test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone xs2a-client-adapter repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 11 for x64 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.11 | |
architecture: x64 | |
- 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 xs2a-client-adapter and create jar files | |
run: mvn clean install -DskipTests -Dmaven.javadoc.skip=true -B -V -q | |
- name: Publish to Maven Central | |
run: | | |
gpg --version | |
export GPG_TTY="$( tty )" #need to run to sign artifacts with maven | |
echo ${{ secrets.GPG_SECRET_KEY }} | base64 --decode | gpg --import --batch | |
echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --batch --import-ownertrust | |
mvn --settings maven_release_settings.xml \ | |
-Dhttp.keepAlive=false \ | |
-Dmaven.wagon.http.pool=false \ | |
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \ | |
-Prelease -DskipTests -U deploy |