Manual Build and Package Release #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Manual Build and Package App | |
on: | |
workflow_dispatch: | |
jobs: | |
build_and_package: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
architecture: [x64, arm64] | |
include: | |
- os: ubuntu-latest | |
architecture: x64 | |
release_suffix: linux-x64 | |
output_path: build/compose/binaries/main-release/deb | |
- os: macos-latest | |
architecture: x64 | |
release_suffix: mac-x64 | |
output_path: build/compose/binaries/main-release/dmg | |
- os: macos-latest | |
architecture: arm64 | |
release_suffix: mac-arm64 | |
output_path: build/compose/binaries/main-release/dmg | |
- os: windows-latest | |
architecture: x64 | |
release_suffix: windows-x64 | |
output_path: build/compose/binaries/main-release/msi | |
exclude: | |
- os: ubuntu-latest | |
architecture: arm64 | |
- os: windows-latest | |
architecture: arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 (Zulu) | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Set up QEMU for ARM builds | |
if: matrix.architecture == 'arm64' && matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install -y qemu-user-static | |
- name: Build | |
run: ./gradlew build | |
- name: Package Release | |
run: ./gradlew packageReleaseDistributionForCurrentOS | |
- name: Upload Release Binaries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-${{ matrix.release_suffix }} | |
path: ${{ matrix.output_path }} |