Release #161
Workflow file for this run
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
# 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: [ published ] # 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 msi | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{matrix.os}}-app-allgames-msi | |
path: pacman-app-allgames/build/jpackage/*.msi | |
if-no-files-found: ignore | |
- name: Upload Linux deb | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{matrix.os}}-app-allgames-deb | |
path: pacman-app-allgames/build/jpackage/*.deb | |
if-no-files-found: ignore | |
- name: Upload Mac-OS dmg | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{matrix.os}}-app-allgames-dmg | |
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 all-games apps | |
uses: actions/download-artifact@v4 | |
with: | |
path: pacman-app-allgames/build/jpackage | |
- name: Download Map Editor app | |
uses: actions/download-artifact@v4 | |
with: | |
path: pacman-app-mapeditor/build/jpackage | |
- 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-latest/*.dmg | |
./pacman-app-allgames/build/jpackage/ubuntu-latest/*.deb | |
./pacman-app-allgames/build/jpackage/windows-latest/*.msi | |
./pacman-app-mapeditor/build/jpackage/windows-latest/*.msi |