iBioSim/.github/workflows/build.yml

44 lines
1.3 KiB
YAML

name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Maven packages
uses: actions/cache@v2.1.1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build iBioSim with Maven
run: mvn -B package -Dmaven.javadoc.skip=true --file pom.xml
- name: Write README
run: echo 'Download latest release from https://github.com/MyersResearchGroup/iBioSim/releases/ and REPLACE iBioSim.jar inside bin/' > README.txt
- name: Prepare artifacts (GUI executable jar as GitHub Artifact)
run: mkdir artifacts && cp -v README.txt artifacts/ && cp -v gui/target/*jar-with-dependencies.jar artifacts/iBioSim.jar
- name: Upload artifacts
uses: actions/upload-artifact@v2.1.4
with:
# Artifact name with commit hash
name: iBioSim-gui-SNAPSHOT-${{ github.sha }}
# A file, directory or wildcard pattern that describes what to upload
path: artifacts
if-no-files-found: error