Work on creating release #15
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: Package | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
create_release: | |
description: 'Set to create a new release' | |
type: boolean | |
jobs: | |
package: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 18.0.2 | |
distribution: 'zulu' | |
java-package: 'jdk+fx' | |
cache: 'maven' | |
- name: Build native installer | |
run: mvn clean install | |
- name: Upload native installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: J3-${{ runner.os }} | |
path: | | |
./target/*.msi | |
./target/*.dmg | |
./target/*.deb | |
- name: Create platform-independent bundle | |
if: runner.os == 'Linux' | |
run: | | |
pushd target | |
mkdir bundle | |
mkdir bundle/J3 | |
cp -r lib/ bundle/J3 | |
cp -r runtime/ bundle/J3 | |
cp -r ../data bundle/J3 | |
cp -r ../animations bundle/J3 | |
cp ../COPYING bundle/J3 | |
cp ../README.md bundle/J3 | |
cp ../src/packaging/j3.bat bundle/J3 | |
cp ../src/packaging/j3 bundle/J3 | |
chmod +x bundle/J3/j3 | |
- name: Upload platform-independent bundle | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: J3 | |
path: | | |
./target/bundle | |
release: | |
if: inputs.create_release | |
runs-on: ubuntu-latest | |
needs: package | |
steps: | |
- uses: actions/download-artifact@v4 | |
- name: Extract release contents | |
run: | | |
ls . |