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:
|
2023-12-05 20:48:15 +00:00
|
|
|
java: [ '8', '11', '17', '21' ] # LTS versions
|
2021-07-24 01:36:30 +00:00
|
|
|
|
|
|
|
steps:
|
2024-04-09 09:59:39 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-07-25 09:32:04 +00:00
|
|
|
- name: Set up JDK ${{ matrix.java }}
|
2024-04-09 09:59:39 +00:00
|
|
|
uses: actions/setup-java@v4
|
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'
|
2023-02-21 00:56:57 +00:00
|
|
|
cache: maven
|
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'
|
2024-04-09 09:59:39 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
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
|