-
Notifications
You must be signed in to change notification settings - Fork 1.2k
38 lines (33 loc) · 1.03 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This will build the BCV repo and upload the package as an artifact
name: Build BCV
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17', '21' ] # LTS versions
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Extract Maven project version
run: echo "bcv_version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
id: project
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
if: ${{ matrix.java == '8' }}
with:
name: Bytecode-Viewer-${{ env.bcv_version }}-SNAPSHOT
path: target/Bytecode-Viewer-${{ env.bcv_version }}.jar
retention-days: 90