[maven-release-plugin] prepare release v1.0.7 #4
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 & Release (tag) | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # For tags with format v1.2.3 nutzt | |
| - 'finmath-experiments-*' # Maven Release Plugin Default: <artifactId>-<version> | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Temurin JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| cache: maven | |
| # OS-Tools, die jpackage erwartet | |
| - name: Install packaging tools (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y fakeroot rpm | |
| - name: Install WiX (Windows) | |
| if: runner.os == 'Windows' | |
| run: choco install wixtoolset -y | |
| - name: Build with Maven (skip tests) | |
| run: mvn -B -DskipTests package | |
| - name: Upload dist artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-${{ runner.os }} | |
| path: target/dist/** | |
| if-no-files-found: error | |
| release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| pattern: dist-* | |
| merge-multiple: true | |
| - name: Create GitHub Release for tag | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: "Release ${{ github.ref_name }}" | |
| generate_release_notes: true | |
| files: artifacts/**/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| windows-msi: | |
| name: Build & Package (Windows, MSI + debug) | |
| runs-on: windows-latest | |
| # optional: run only on tags | |
| # if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Temurin JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| # Accept newer WiX if present; don't fail the job | |
| - name: Ensure WiX available (prefer 3.14.1, accept newer) | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Continue' | |
| choco install wixtoolset --version=3.14.1 -y --no-progress | |
| if ($LASTEXITCODE -ne 0) { | |
| Write-Host "A newer WiX is already installed; proceeding with the existing version." | |
| } | |
| # Ensure WiX bin is on PATH | |
| $wixRoot = Get-ChildItem -Path "C:\Program Files (x86)\" -Directory -Filter "WiX Toolset v3.*" -ErrorAction SilentlyContinue | Sort-Object FullName -Descending | Select-Object -First 1 | |
| if ($wixRoot) { | |
| $wixBin = Join-Path $wixRoot.FullName "bin" | |
| Write-Host "Using WiX path: $wixBin" | |
| $wixBin | Out-File -FilePath $env:GITHUB_PATH -Append | |
| } else { | |
| Write-Error "WiX not found after install." | |
| exit 1 | |
| } | |
| where.exe light.exe | |
| where.exe candle.exe | |
| - name: Tool versions | |
| shell: pwsh | |
| run: | | |
| mvn -version | |
| Write-Host "JAVA_HOME: $env:JAVA_HOME" | |
| jpackage --version | |
| - name: Build (debug) | |
| run: mvn -B -e -X -DskipTests clean package | |
| - name: Package MSI with jpackage (verbose, fixed temp) | |
| shell: pwsh | |
| run: | | |
| $temp = "D:\a\_wix_tmp" | |
| New-Item -ItemType Directory -Force -Path $temp | Out-Null | |
| mvn -B -e -X -DskipTests -Djpackage.verbose=true -Djpackage.temp="$temp" jpackage:jpackage | |
| - name: Upload installers (MSI/EXE) | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-installers | |
| path: | | |
| **\target\dist\*.msi | |
| **\target\dist\*.exe | |
| **\target\*.msi | |
| **\target\*.exe | |
| if-no-files-found: warn | |
| - name: Upload WiX & jpackage temps | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wix-and-jpackage-temp | |
| path: | | |
| D:\a\_wix_tmp\** | |
| **\jdk.jpackage*\wixobj\** | |
| **\jdk.jpackage*\*.wxs | |
| **\jdk.jpackage*\*.wixpdb | |
| **\jdk.jpackage*\*.wixobj | |
| **\images\win-msi.image\** | |
| if-no-files-found: ignore | |
| - name: Upload Maven logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: maven-logs | |
| path: | | |
| **\mvn*.log | |
| **\build.log | |
| **\surefire-reports\** | |
| if-no-files-found: ignore | |