Archived
- Build workflow now only triggers on pull requests - Removed native image builds from build workflow - Native builds are only done in release workflow on tag push Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: Build
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: 'maven'
|
|
|
|
- name: Run tests
|
|
run: mvn verify -Dspotbugs.skip=true -Dpmd.skip=true
|
|
|
|
- name: Upload test results
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: test-results
|
|
path: target/surefire-reports/
|
|
|
|
build-jar:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: 'maven'
|
|
|
|
- name: Build JAR
|
|
run: mvn package -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true
|
|
|
|
- name: Upload JAR
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: barn-jar
|
|
path: target/barn-*.jar
|
|
retention-days: 7
|