OCFL 2.1.0 and Update CI (#60) #91
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: Build | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
java: ['11'] | |
experimental: [false] | |
include: | |
- java: 17 | |
os: ubuntu-latest | |
experimental: true | |
steps: | |
- name: Git support longpaths | |
run: git config --global core.longpaths true | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
cache: 'maven' | |
- name: Build with Maven | |
run: mvn -B -U clean install | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git support longpaths | |
run: git config --global core.longpaths true | |
- name: Checkout fcrepo | |
uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
server-id: sonatype-nexus-snapshots | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
# https://github.com/actions/setup-java/issues/43 | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Publish package | |
run: mvn -U -B -DskipTests=true deploy | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |