Skip to content

Build & test

Build & test #908

Workflow file for this run

name: Build & test
on:
push:
branches:
- master
- '[0-9]+.[0-9]+'
pull_request:
branches:
- master
- '[0-9]+.[0-9]+'
schedule:
- cron: '0 4 * * *'
jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Test with Maven
run: mvn clean test
publish:
name: Deploy to OSSRH
if: ${{ github.repository_owner == 'sirixdb' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
server-id: sonatype-nexus-snapshots
server-username: SONATYPE_NEXUS_USERNAME
server-password: SONATYPE_NEXUS_PASSWORD
- name: Maven deploy
run: mvn --batch-mode deploy -DskipTests
env:
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}