2020-08-25 14:10:56 +00:00
|
|
|
name: Package
|
2020-08-24 13:37:35 +00:00
|
|
|
|
2020-08-24 13:40:44 +00:00
|
|
|
on: workflow_dispatch
|
2020-08-24 13:37:35 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-08-25 14:20:45 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-08-28 12:42:38 +00:00
|
|
|
os: [windows-latest, ubuntu-latest]
|
2020-08-24 13:37:35 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-08-24 15:46:28 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2021-01-25 14:55:21 +00:00
|
|
|
- name: Set up JDK 15.0.2
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2021-01-25 12:41:33 +00:00
|
|
|
uses: joschi/setup-jdk@v2
|
2020-08-24 13:37:35 +00:00
|
|
|
with:
|
2021-01-25 12:44:38 +00:00
|
|
|
java-version: 15
|
2021-01-25 14:55:21 +00:00
|
|
|
- name: Set up JDK 14.0.2
|
|
|
|
if: ${{ runner.os == 'Windows' }}
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 14.0.2
|
2020-08-25 13:31:04 +00:00
|
|
|
- name: Show Build Versions
|
|
|
|
run: ./gradlew -v
|
2020-08-24 13:37:35 +00:00
|
|
|
- name: Cache Gradle packages
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
|
|
|
restore-keys: ${{ runner.os }}-gradle
|
|
|
|
- name: Build with Gradle
|
|
|
|
run: ./gradlew jpackage
|
2021-03-20 12:13:10 +00:00
|
|
|
- name: Package zip distribution
|
|
|
|
if: ${{ runner.os == 'Windows' }}
|
|
|
|
run: ./gradlew packageZipDistribution
|
|
|
|
- name: Package tar distribution
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
|
|
|
run: ./gradlew packageTarDistribution
|
2020-08-24 13:37:35 +00:00
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-08-25 14:10:56 +00:00
|
|
|
name: Sparrow Build - ${{ runner.os }}
|
2021-03-20 12:13:10 +00:00
|
|
|
path: |
|
|
|
|
build/jpackage/*
|
|
|
|
!build/jpackage/Sparrow/
|