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
|
|
|
|
2023-07-05 07:48:48 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-08-24 13:37:35 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-08-25 14:20:45 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-02-15 14:50:05 +00:00
|
|
|
os: [windows-2022, ubuntu-20.04, macos-12]
|
2020-08-24 13:37:35 +00:00
|
|
|
steps:
|
2024-02-15 09:39:46 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-08-24 15:46:28 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2024-02-15 14:50:05 +00:00
|
|
|
- name: Set up JDK 21.0.1
|
2024-02-15 09:39:46 +00:00
|
|
|
uses: actions/setup-java@v4
|
2021-01-25 14:55:21 +00:00
|
|
|
with:
|
2022-05-17 10:30:22 +00:00
|
|
|
distribution: 'temurin'
|
2024-02-15 09:39:46 +00:00
|
|
|
java-version: '21.0.1'
|
2020-08-25 13:31:04 +00:00
|
|
|
- name: Show Build Versions
|
|
|
|
run: ./gradlew -v
|
2020-08-24 13:37:35 +00:00
|
|
|
- name: Build with Gradle
|
|
|
|
run: ./gradlew jpackage
|
2021-03-20 12:13:10 +00:00
|
|
|
- name: Package zip distribution
|
2022-06-07 13:01:00 +00:00
|
|
|
if: ${{ runner.os == 'Windows' || runner.os == 'macOS' }}
|
2021-03-20 12:13:10 +00:00
|
|
|
run: ./gradlew packageZipDistribution
|
|
|
|
- name: Package tar distribution
|
2022-06-07 13:01:00 +00:00
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2021-03-20 12:13:10 +00:00
|
|
|
run: ./gradlew packageTarDistribution
|
2020-08-24 13:37:35 +00:00
|
|
|
- name: Upload Artifacts
|
2024-02-15 09:39:46 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-08-24 13:37:35 +00:00
|
|
|
with:
|
2020-08-25 14:10:56 +00:00
|
|
|
name: Sparrow Build - ${{ runner.os }}
|
2022-10-25 08:04:03 +00:00
|
|
|
path: |
|
|
|
|
build/jpackage/*
|
|
|
|
!build/jpackage/Sparrow/
|
|
|
|
- name: Headless build with Gradle
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
|
|
|
run: ./gradlew -Djava.awt.headless=true clean jpackage
|
|
|
|
- name: Package headless tar distribution
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2022-10-25 08:23:17 +00:00
|
|
|
run: ./gradlew -Djava.awt.headless=true packageTarDistribution
|
|
|
|
- name: Rename Headless Artifacts
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2022-10-25 08:45:48 +00:00
|
|
|
run: for f in build/jpackage/sparrow*; do mv -v "$f" "${f/sparrow/sparrow-server}"; done;
|
2022-10-25 08:04:03 +00:00
|
|
|
- name: Upload Headless Artifact
|
|
|
|
if: ${{ runner.os == 'Linux' }}
|
2024-02-15 09:39:46 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-10-25 08:04:03 +00:00
|
|
|
with:
|
|
|
|
name: Sparrow Build - ${{ runner.os }} Headless
|
2021-03-20 12:13:10 +00:00
|
|
|
path: |
|
|
|
|
build/jpackage/*
|
|
|
|
!build/jpackage/Sparrow/
|