bcv-vf/.github/workflows/maven.yml

38 lines
1 KiB
YAML
Raw Normal View History

2021-07-24 01:37:47 +00:00
# This will build the BCV repo and upload the package as an artifact
2021-07-24 01:36:30 +00:00
2021-07-24 01:37:47 +00:00
name: Build BCV
2021-07-24 01:36:30 +00:00
on:
push:
2021-07-24 01:38:25 +00:00
branches: [ master ]
2021-07-24 01:36:30 +00:00
pull_request:
2021-07-24 01:38:25 +00:00
branches: [ master ]
2021-07-24 01:36:30 +00:00
jobs:
build:
runs-on: ubuntu-latest
2021-07-25 09:32:04 +00:00
strategy:
matrix:
2021-12-19 21:10:40 +00:00
java: [ '8', '11', '17' ] # LTS versions
2021-07-24 01:36:30 +00:00
steps:
2022-10-18 14:10:27 +00:00
- uses: actions/checkout@v3
2021-07-25 09:32:04 +00:00
- name: Set up JDK ${{ matrix.java }}
2022-10-18 14:10:27 +00:00
uses: actions/setup-java@v3
2021-07-24 01:36:30 +00:00
with:
2021-07-25 09:32:04 +00:00
java-version: ${{ matrix.java }}
2021-09-16 12:06:51 +00:00
distribution: 'temurin'
2021-07-24 01:36:30 +00:00
- name: Build with Maven
run: mvn -B package --file pom.xml
2021-07-24 01:37:47 +00:00
- name: Extract Maven project version
2022-10-18 14:19:18 +00:00
run: echo "bcv_version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
2021-07-24 01:37:47 +00:00
id: project
- name: 'Upload Artifact'
2022-10-18 14:10:27 +00:00
uses: actions/upload-artifact@v3
2021-07-25 09:50:06 +00:00
if: ${{ matrix.java == '8' }}
2021-07-24 01:37:47 +00:00
with:
2022-10-18 14:19:18 +00:00
name: Bytecode-Viewer-${{ env.bcv_version }}-SNAPSHOT
path: target/Bytecode-Viewer-${{ env.bcv_version }}.jar
2021-07-24 01:37:47 +00:00
retention-days: 90