Refresh onfido-java after onfido-openapi-spec update (a34b6d8) #435
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
# 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 | |
on: | |
push: | |
branches: | |
- master | |
- "release/**" | |
pull_request: | |
branches: | |
- master | |
- "release/**" | |
workflow_dispatch: | |
release: | |
types: | |
- published | |
jobs: | |
integration-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "11" | |
distribution: "adopt" | |
- name: Install and run linter over tests | |
run: | | |
npm install google-java-format | |
npx google-java-format --set-exit-if-changed -i $(git ls-files src/test/\*.java) | |
- name: Cache local Maven repository | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml -Dmaven.test.skip | |
- name: Run integration tests with Maven | |
run: mvn test | |
env: | |
ONFIDO_API_TOKEN: ${{ secrets.ONFIDO_API_TOKEN }} | |
ONFIDO_SAMPLE_APPLICANT_ID: ${{ secrets.ONFIDO_SAMPLE_APPLICANT_ID }} | |
ONFIDO_SAMPLE_VIDEO_ID_1: ${{ secrets.ONFIDO_SAMPLE_VIDEO_ID_1 }} | |
ONFIDO_SAMPLE_VIDEO_ID_2: ${{ secrets.ONFIDO_SAMPLE_VIDEO_ID_2 }} | |
ONFIDO_SAMPLE_MOTION_ID_1: ${{ secrets.ONFIDO_SAMPLE_MOTION_ID_1 }} | |
ONFIDO_SAMPLE_MOTION_ID_2: ${{ secrets.ONFIDO_SAMPLE_MOTION_ID_2 }} | |
publish: | |
runs-on: ubuntu-latest | |
needs: integration-tests | |
if: github.event_name == 'release' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Maven Central Repository | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "11" | |
distribution: "adopt" | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Install gpg secret key | |
run: | | |
echo "$GPG_KEY" > key.asc | |
gpg --import --no-tty --batch --yes key.asc | |
shell: bash | |
env: | |
GPG_KEY: ${{ secrets.GPG_SECRET_KEY }} | |
- name: Publish package | |
run: | | |
export GPG_TTY=$(tty) | |
mvn --settings .maven.xml -Dmaven.test.skip \ | |
-P release,sign-and-deliver clean deploy | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |