Release #215
Workflow file for this run
This file contains hidden or 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
# Builds installers (msi, deb, dmg) for Windows, Linux and Mac-OS and attaches the installers for the | |
# Pac-Man 3D game version to a release (when it is published via the GitHub UI). | |
name: Release | |
on: | |
release: | |
types: [ created, edited ] # if this is omitted, the workflow starts 3 times when creating a release! | |
jobs: | |
build-and-upload-artifacts: | |
strategy: | |
matrix: | |
os: [ windows-latest, ubuntu-latest, macos-latest ] | |
java: [ '21' ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
name: Build and upload artifacts for ${{ matrix.os }} JDK ${{ matrix.java }} | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
- name: Echo JAVA_HOME | |
run: echo $JAVA_HOME | |
- name: Verify Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v2 | |
- name: Execute gradle jpackage | |
run: ./gradlew --info --stacktrace jpackage | |
- name: Upload Windows installer | |
if: matrix.os == 'windows-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-installer | |
path: pacman-app-allgames/build/jpackage/*.msi | |
if-no-files-found: ignore | |
- name: Upload Linux deb | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-installer | |
path: pacman-app-allgames/build/jpackage/*.deb | |
if-no-files-found: ignore | |
- name: Upload Mac-OS dmg | |
if: matrix.os == 'macos-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-installer | |
path: pacman-app-allgames/build/jpackage/*.dmg | |
if-no-files-found: ignore | |
download-and-release-artifacts: | |
needs: build-and-upload-artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Windows installer | |
uses: actions/download-artifact@v4 | |
with: | |
name: windows-installer | |
path: pacman-app-allgames/build/jpackage/windows | |
- name: Download Linux installer | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-installer | |
path: pacman-app-allgames/build/jpackage/linux | |
- name: Download Mac installer | |
uses: actions/download-artifact@v4 | |
with: | |
name: macos-installer | |
path: pacman-app-allgames/build/jpackage/macos | |
- name: List files | |
run: ls -R | |
- name: Attach installers to the release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./pacman-app-allgames/build/jpackage/macos/*.dmg | |
./pacman-app-allgames/build/jpackage/linux/*.deb | |
./pacman-app-allgames/build/jpackage/windows/*.msi |