update readme #88
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
| name: jpackage | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| package: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macos-15-intel ] | |
| arch: [amd64] | |
| include: | |
| - os: macos-latest | |
| arch: aarch64 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: liberica | |
| java-version: 25 | |
| architecture: ${{ matrix.arch }} | |
| - name: Make Gradle wrapper executable | |
| if: runner.os != 'Windows' | |
| run: chmod +x ./gradlew | |
| - name: Build project | |
| shell: bash | |
| run: | | |
| if [ "${{ runner.os }}" == "Windows" ]; then | |
| ./gradlew.bat clean shadowJar | |
| else | |
| ./gradlew clean shadowJar | |
| fi | |
| - name: Build macOS amd64 dmg | |
| if: runner.os == 'macOS' && matrix.arch == 'amd64' | |
| run: | | |
| jpackage \ | |
| --input build/libs \ | |
| --main-jar cogfly-1.1.0.jar \ | |
| --name "Cogfly_intel" \ | |
| --type dmg \ | |
| --vendor "Ambershadow" \ | |
| --icon ./icons/icon.icns \ | |
| --app-version 1.1.0 \ | |
| --dest output/${{ runner.os }}-${{ matrix.arch }} | |
| - name: Build macOS aarch64 dmg | |
| if: runner.os == 'macOS' && matrix.arch == 'aarch64' | |
| run: | | |
| jpackage \ | |
| --input build/libs \ | |
| --main-jar cogfly-1.1.0.jar \ | |
| --name "Cogfly_silicon" \ | |
| --type dmg \ | |
| --vendor "Ambershadow" \ | |
| --icon ./icons/icon.icns \ | |
| --app-version 1.1.0 \ | |
| --dest output/${{ runner.os }}-${{ matrix.arch }} | |
| - name: Build MSI | |
| if: runner.os == 'Windows' && matrix.arch == 'amd64' | |
| run: | | |
| jpackage ` | |
| --input build/libs ` | |
| --main-jar cogfly-1.1.0.jar ` | |
| --name Cogfly ` | |
| --type msi ` | |
| --vendor "Ambershadow" ` | |
| --icon ./icons/icon.ico ` | |
| --app-version 1.1.0 ` | |
| --dest output/${{ runner.os }}-${{ matrix.arch }} ` | |
| --win-menu ` | |
| --win-shortcut | |
| - name: Build EXE | |
| if: runner.os == 'Windows' && matrix.arch == 'amd64' | |
| run: | | |
| jpackage ` | |
| --input build/libs ` | |
| --main-jar cogfly-1.1.0.jar ` | |
| --name Cogfly ` | |
| --type exe ` | |
| --vendor "Ambershadow" ` | |
| --icon ./icons/icon.ico ` | |
| --app-version 1.1.0 ` | |
| --dest output/${{ runner.os }}-${{ matrix.arch }} ` | |
| --win-menu ` | |
| --win-shortcut | |
| - name: Build DEB | |
| if: runner.os == 'Linux' && matrix.arch == 'amd64' | |
| run: | | |
| jpackage \ | |
| --input build/libs \ | |
| --main-jar cogfly-1.1.0.jar \ | |
| --name Cogfly \ | |
| --type deb \ | |
| --vendor "Ambershadow" \ | |
| --icon ./icons/icon.png \ | |
| --app-version 1.1.0 \ | |
| --dest output/${{ runner.os }}-${{ matrix.arch }} \ | |
| - name: Build RPM | |
| if: runner.os == 'Linux' && matrix.arch == 'amd64' | |
| run: | | |
| jpackage \ | |
| --input build/libs \ | |
| --main-jar cogfly-1.1.0.jar \ | |
| --name Cogfly \ | |
| --type rpm \ | |
| --vendor "Ambershadow" \ | |
| --icon ./icons/icon.png \ | |
| --app-version 1.1.0 \ | |
| --dest output/${{ runner.os }}-${{ matrix.arch }} \ | |
| - name: Build APPIMAGE | |
| if: runner.os == 'Linux' && matrix.arch == 'amd64' | |
| run: | | |
| mkdir -p output/appimage | |
| jpackage \ | |
| --input build/libs \ | |
| --main-jar cogfly-1.1.0.jar \ | |
| --name Cogfly-Linux_amd64 \ | |
| --type app-image \ | |
| --vendor "Ambershadow" \ | |
| --icon ./icons/icon.png \ | |
| --app-version 1.1.0 \ | |
| --dest output/appimage | |
| cp ./icons/icon.png output/appimage/Cogfly-Linux_amd64/ | |
| cp ./Cogfly.desktop output/appimage/Cogfly-Linux_amd64/ | |
| cat > output/appimage/Cogfly-Linux_amd64/AppRun << 'EOF' | |
| #!/bin/sh | |
| HERE="$(dirname "$(readlink -f "$0")")" | |
| exec "$HERE/bin/Cogfly-Linux_amd64" "$@" | |
| EOF | |
| chmod +x output/appimage/Cogfly-Linux_amd64/AppRun | |
| sudo apt update | |
| wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool | |
| chmod +x appimagetool | |
| ls -l output/appimage/Cogfly-Linux_amd64 | |
| export APPIMAGE_EXTRACT_AND_RUN=1 | |
| ./appimagetool output/appimage/Cogfly-Linux_amd64 output/${{ runner.os }}-${{ matrix.arch }}/Cogfly-1.1.0.AppImage | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Cogfly-${{ runner.os }}-${{ matrix.arch }} | |
| path: output/${{ runner.os }}-${{ matrix.arch }} | |
| retention-days: 14 |