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:
java: [ '8', '11', '16' ] # All currently supported versions
2021-07-24 01:36:30 +00:00
steps:
- uses: actions/checkout@v2
2021-07-25 09:32:04 +00:00
- name: Set up JDK ${{ matrix.java }}
2021-07-24 01:36:30 +00:00
uses: actions/setup-java@v2
with:
2021-07-25 09:32:04 +00:00
java-version: ${{ matrix.java }}
2021-07-24 01:36:30 +00:00
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
2021-07-24 01:37:47 +00:00
- name: Extract Maven project version
run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
id: project
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
2021-07-25 09:50:06 +00:00
if: ${{ matrix.java == '8' }}
2021-07-24 01:37:47 +00:00
with:
name: Bytecode-Viewer-${{ steps.project.outputs.version }}-SNAPSHOT
path: target/Bytecode-Viewer-${{ steps.project.outputs.version }}.jar
retention-days: 90