Bump version to 2.5.1 #3
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
| name: Build Native Installers | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Only builds on version tags like v2.4.3 | |
| workflow_dispatch: # Manual trigger from the GitHub UI | |
| jobs: | |
| mac-intel: | |
| runs-on: macos-13 # Intel runner | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Extract version from pom.xml | |
| id: version | |
| run: | | |
| VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Building version: $VERSION" | |
| - name: Build .jar | |
| run: mvn clean package | |
| - name: Run jpackage for macOS Intel | |
| run: | | |
| jpackage \ | |
| --type dmg \ | |
| --name EWItool \ | |
| --input target \ | |
| --main-jar EWItool-${{ steps.version.outputs.version }}.jar \ | |
| --main-class com.github.ledhed2222.ewitool.Main \ | |
| --dest target \ | |
| --app-version ${{ steps.version.outputs.version }} \ | |
| --vendor "Ledhed2222" \ | |
| --icon src/main/resources/logo.icns | |
| - name: Rename DMG to include architecture | |
| run: | | |
| mv target/EWItool-${{ steps.version.outputs.version }}.dmg target/EWItool-${{ steps.version.outputs.version }}-macos-intel.dmg | |
| - name: Upload to gh release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: target/*-macos-intel.dmg | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| mac-silicon: | |
| runs-on: macos-latest # ARM runner (M1/M2) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Extract version from pom.xml | |
| id: version | |
| run: | | |
| VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Building version: $VERSION" | |
| - name: Build .jar | |
| run: mvn clean package | |
| - name: Run jpackage for macOS Silicon | |
| run: | | |
| jpackage \ | |
| --type dmg \ | |
| --name EWItool \ | |
| --input target \ | |
| --main-jar EWItool-${{ steps.version.outputs.version }}.jar \ | |
| --main-class com.github.ledhed2222.ewitool.Main \ | |
| --dest target \ | |
| --app-version ${{ steps.version.outputs.version }} \ | |
| --vendor "Ledhed2222" \ | |
| --icon src/main/resources/logo.icns | |
| - name: Rename DMG to include architecture | |
| run: | | |
| mv target/EWItool-${{ steps.version.outputs.version }}.dmg target/EWItool-${{ steps.version.outputs.version }}-macos-silicon.dmg | |
| - name: Upload to gh release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: target/*-macos-silicon.dmg | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Extract version from pom.xml | |
| id: version | |
| shell: pwsh | |
| run: | | |
| [xml]$pom = Get-Content pom.xml | |
| $VERSION = $pom.project.version | |
| echo "version=$VERSION" >> $env:GITHUB_OUTPUT | |
| echo "Building version: $VERSION" | |
| - name: Build .jar | |
| run: mvn clean package | |
| - name: Convert PNG to ICO for Windows | |
| run: | | |
| # jpackage will use PNG on Windows if ICO not available | |
| # We'll use the PNG file directly | |
| - name: Run jpackage for Windows | |
| run: | | |
| jpackage ` | |
| --type exe ` | |
| --name EWItool ` | |
| --input target ` | |
| --main-jar EWItool-${{ steps.version.outputs.version }}.jar ` | |
| --main-class com.github.ledhed2222.ewitool.Main ` | |
| --dest target ` | |
| --app-version ${{ steps.version.outputs.version }} ` | |
| --vendor "Ledhed2222" ` | |
| --icon src/main/resources/logo.png ` | |
| --win-dir-chooser ` | |
| --win-menu ` | |
| --win-shortcut | |
| - name: Upload to gh release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: target/*.exe | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Extract version from pom.xml | |
| id: version | |
| run: | | |
| VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Building version: $VERSION" | |
| - name: Install jpackage dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libfreetype6-dev libasound2-dev fakeroot rpm | |
| - name: Build .jar | |
| run: mvn clean package | |
| - name: Run jpackage for Linux (DEB) | |
| run: | | |
| jpackage \ | |
| --type deb \ | |
| --name ewitool \ | |
| --input target \ | |
| --main-jar EWItool-${{ steps.version.outputs.version }}.jar \ | |
| --main-class com.github.ledhed2222.ewitool.Main \ | |
| --dest target \ | |
| --app-version ${{ steps.version.outputs.version }} \ | |
| --vendor "Ledhed2222" \ | |
| --icon src/main/resources/logo.png \ | |
| --linux-shortcut | |
| - name: Run jpackage for Linux (RPM) | |
| run: | | |
| jpackage \ | |
| --type rpm \ | |
| --name ewitool \ | |
| --input target \ | |
| --main-jar EWItool-${{ steps.version.outputs.version }}.jar \ | |
| --main-class com.github.ledhed2222.ewitool.Main \ | |
| --dest target \ | |
| --app-version ${{ steps.version.outputs.version }} \ | |
| --vendor "Ledhed2222" \ | |
| --icon src/main/resources/logo.png \ | |
| --linux-shortcut | |
| - name: Upload to gh release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| target/*.deb | |
| target/*.rpm | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |