fix nightly pipelines

This commit is contained in:
2026-03-24 17:18:23 +01:00
committed by Philipp Wagner
parent d5b8508aa6
commit 6716751697

View File

@@ -10,19 +10,22 @@ on:
jobs: jobs:
build-windows-zip: build-windows-zip:
name: Build Windows ZIP Artifact name: Build Windows ZIP
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Extract version from pom.xml - name: Resolve nightly version info
shell: pwsh shell: pwsh
run: | run: |
$xml = [xml](Get-Content pom.xml) $xml = [xml](Get-Content pom.xml)
$version = $xml.project.version $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 "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 - name: Set up Java 17
uses: actions/setup-java@v4 uses: actions/setup-java@v4
@@ -56,27 +59,30 @@ jobs:
if (-not (Test-Path dist/praktiKST)) { if (-not (Test-Path dist/praktiKST)) {
throw "No Windows app-image produced by jpackage" 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 uses: actions/upload-artifact@v4
with: with:
name: nightly-windows-zip name: windows-zip
path: dist/praktiKST-${{ env.VERSION }}-windows-x64.zip path: dist/praktiKST-*-windows-x64.zip
retention-days: 14 retention-days: 14
build-linux-appimage: build-linux-appimage:
name: Build Linux AppImage Artifact name: Build Linux AppImage
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Extract version from pom.xml - name: Resolve nightly version info
run: | run: |
VERSION=$(grep -m1 '<version>' pom.xml | sed 's/.*<version>\(.*\)<\/version>.*/\1/') VERSION=$(grep -m1 '<version>' pom.xml | sed 's/.*<version>\(.*\)<\/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 - name: Set up Java 17
uses: actions/setup-java@v4 uses: actions/setup-java@v4
@@ -135,11 +141,11 @@ jobs:
run: | run: |
wget -q -O target/appimagetool.AppImage https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage wget -q -O target/appimagetool.AppImage https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x target/appimagetool.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 uses: actions/upload-artifact@v4
with: with:
name: nightly-linux-appimage name: linux-appimage
path: dist/praktiKST-${{ env.VERSION }}-linux-x86_64.AppImage path: dist/praktiKST-*-linux-x86_64.AppImage
retention-days: 14 retention-days: 14