Skip to content

Merge pull request #154 from Riskified/TIS-709 #67

Merge pull request #154 from Riskified/TIS-709

Merge pull request #154 from Riskified/TIS-709 #67

Workflow file for this run

name: Maven CI/CD
on:
push:
branches:
- master
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checking out
uses: actions/checkout@v3 ##action to give our job access to code in our repo
- name: Cache local mvn repo
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: v1-dependencies-{{ hashFiles('**/pom.xml') }}
restore-keys: |
v1-dependencies-
- run: mvn dependency:go-offline
- name: Configuring GPG key
run: |
echo $GPG_SIGNING_KEY | base64 --decode | gpg --batch --import
env:
GPG_SIGNING_KEY: ${{ secrets.SECRING_GPG_ASC_BASE64 }}
- name: Set up JDK 8
uses: actions/setup-java@v2 ##this action sets up a java environment that our job can run in
with:
distribution: 'zulu'
java-version: 8
overwrite-settings: false
- name: Build project with Maven
run: mvn -B package --file pom.xml
- name: Publish to Apache Maven Central
run: mvn -s .github/workflows/maven-release-setting.xml clean deploy -DdeployAtEnd=true -DperformRelease=true -DskipTests -Dspotbugs.skip=true
env:
SERVER_OSSRH_USERNAME: ${{ secrets.SERVER_OSSRH_USERNAME }}
SERVER_OSSRH_PASSWORD: ${{ secrets.SERVER_OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}