This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
Merge pull request #488 from apereo/renovate/junit5-monorepo #493
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: Build | |
env: | |
TERM: xterm-256color | |
SONATYPE_PWD: ${{ secrets.SONATYPE_PWD }} | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
JDK_CURRENT: 17 | |
########################################################################## | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
########################################################################## | |
jobs: | |
cancel-previous-runs: | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
steps: | |
- uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
needs: cancel-previous-runs | |
steps: | |
- uses: actions/checkout@v3 | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ env.JDK_CURRENT }} | |
distribution: 'temurin' | |
- name: Build | |
run: mvn clean install | |
########################################################################## | |
publish-snapshots: | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: ${{ github.event_name == 'push' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ env.JDK_CURRENT }} | |
distribution: 'temurin' | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Publish SNAPSHOTs | |
if: ${{ env.SONATYPE_USER != null && env.SONATYPE_PWD != null }} | |
run: mvn deploy --settings ./.github/workflows/settings.xml | |