From 67167516977b1318b15e93bd15833cfa0e44af83 Mon Sep 17 00:00:00 2001 From: Philipp Wagner Date: Tue, 24 Mar 2026 17:18:23 +0100 Subject: [PATCH] fix nightly pipelines --- .github/workflows/nightly-artifacts.yml | 32 +++++++++++++++---------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/nightly-artifacts.yml b/.github/workflows/nightly-artifacts.yml index ff34964..426c22d 100644 --- a/.github/workflows/nightly-artifacts.yml +++ b/.github/workflows/nightly-artifacts.yml @@ -10,19 +10,22 @@ on: jobs: build-windows-zip: - name: Build Windows ZIP Artifact + name: Build Windows ZIP runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Extract version from pom.xml + - name: Resolve nightly version info shell: pwsh run: | $xml = [xml](Get-Content pom.xml) $version = $xml.project.version + $shortSha = "${{ github.sha }}".Substring(0, 7) Add-Content -Path $env:GITHUB_ENV -Value "VERSION=$version" + Add-Content -Path $env:GITHUB_ENV -Value "SHORT_SHA=$shortSha" + Add-Content -Path $env:GITHUB_ENV -Value "ASSET_BASENAME=praktiKST-$version-$shortSha" - name: Set up Java 17 uses: actions/setup-java@v4 @@ -56,27 +59,30 @@ jobs: if (-not (Test-Path dist/praktiKST)) { throw "No Windows app-image produced by jpackage" } - Compress-Archive -Path dist/praktiKST -DestinationPath dist/praktiKST-${{ env.VERSION }}-windows-x64.zip -Force + Compress-Archive -Path dist/praktiKST -DestinationPath "dist/$env:ASSET_BASENAME-windows-x64.zip" -Force - - name: Upload Windows ZIP artifact + - name: Upload Windows artifact uses: actions/upload-artifact@v4 with: - name: nightly-windows-zip - path: dist/praktiKST-${{ env.VERSION }}-windows-x64.zip + name: windows-zip + path: dist/praktiKST-*-windows-x64.zip retention-days: 14 build-linux-appimage: - name: Build Linux AppImage Artifact + name: Build Linux AppImage runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Extract version from pom.xml + - name: Resolve nightly version info run: | VERSION=$(grep -m1 '' pom.xml | sed 's/.*\(.*\)<\/version>.*/\1/') - echo "VERSION=$VERSION" >> $GITHUB_ENV + SHORT_SHA="${GITHUB_SHA::7}" + echo "VERSION=$VERSION" >> "$GITHUB_ENV" + echo "SHORT_SHA=$SHORT_SHA" >> "$GITHUB_ENV" + echo "ASSET_BASENAME=praktiKST-${VERSION}-${SHORT_SHA}" >> "$GITHUB_ENV" - name: Set up Java 17 uses: actions/setup-java@v4 @@ -135,11 +141,11 @@ jobs: run: | wget -q -O target/appimagetool.AppImage https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage chmod +x target/appimagetool.AppImage - APPIMAGE_EXTRACT_AND_RUN=1 ARCH=x86_64 target/appimagetool.AppImage target/praktiKST.AppDir dist/praktiKST-${{ env.VERSION }}-linux-x86_64.AppImage + APPIMAGE_EXTRACT_AND_RUN=1 ARCH=x86_64 target/appimagetool.AppImage target/praktiKST.AppDir "dist/${ASSET_BASENAME}-linux-x86_64.AppImage" - - name: Upload Linux AppImage artifact + - name: Upload Linux artifact uses: actions/upload-artifact@v4 with: - name: nightly-linux-appimage - path: dist/praktiKST-${{ env.VERSION }}-linux-x86_64.AppImage + name: linux-appimage + path: dist/praktiKST-*-linux-x86_64.AppImage retention-days: 14