Skip to content

v1.3.1

v1.3.1 #25

Workflow file for this run

name: Maven Release
# Performs a Maven release using JDK 11 when a new GitHub release has been published
on:
release:
types: [ published ]
jobs:
publish:
name: Maven Artifact Publisher (JDK 11)
runs-on: ubuntu-latest
env:
SKIP_JAR_DEPLOYMENT: ${{ secrets.SKIP_JAR_DEPLOYMENT }}
MAVEN_CACHE_KEY: ${{ secrets.MAVEN_CACHE_KEY }}
steps:
- name: Check out source code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2
- name: Install JDK 11
uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 # v1
with:
java-version: 17
# If running locally in act, install Maven
- name: Set up Maven if needed
if: ${{ env.ACT }}
uses: stCarolas/setup-maven@1d56b37995622db66cce1214d81014b09807fb5a # v4
with:
maven-version: 3.6.3
- name: Set up Maven cache
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a # v2
if: ${{ env.MAVEN_CACHE_KEY }}
with:
path: ~/.m2
key: uclalibrary-cache-${{ secrets.MAVEN_CACHE_KEY }}-${{ hashFiles('**/pom.xml') }}
restore-keys: uclalibrary-cache-${{ secrets.MAVEN_CACHE_KEY }}-
- name: Set Jar deployment config
if: env.SKIP_JAR_DEPLOYMENT == null
run: echo "SKIP_JAR_DEPLOYMENT=false" >> $GITHUB_ENV
- name: Optionally, login to Docker repository
uses: docker/login-action@f3364599c6aa293cdc2b8391b1b56d0c30e45c8a # v1.8.0
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
if: env.DOCKER_USERNAME != null
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Release with Maven
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 # v1.4.0
with:
gpg_private_key: ${{ secrets.BUILD_KEY }}
gpg_passphrase: ${{ secrets.BUILD_PASSPHRASE }}
nexus_username: ${{ secrets.SONATYPE_USERNAME }}
nexus_password: ${{ secrets.SONATYPE_PASSWORD }}
maven_profiles: release
maven_args: >
-Drevision=${{ github.event.release.tag_name }}
-ntp -Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=error -DlogLevel=DEBUG -DtestLogLevel=DEBUG
-DskipNexusStagingDeployMojo="${{ env.SKIP_JAR_DEPLOYMENT }}"
-Ddocker.registry.username="${{ secrets.DOCKER_USERNAME }}"
-Ddocker.registry.account="${{ secrets.DOCKER_REGISTRY_ACCOUNT}}"
-Ddocker.registry.password="${{ secrets.DOCKER_PASSWORD }}"
-Dfester.s3.access_key="${{ secrets.AWS_ACCESS_KEY }}"
-Dfester.s3.secret_key="${{ secrets.AWS_SECRET_KEY }}"
-Dfester.s3.bucket="${{ secrets.S3_BUCKET }}"