mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-03-29 20:20:56 +02:00
fix nightly pipelines
This commit is contained in:
32
.github/workflows/nightly-artifacts.yml
vendored
32
.github/workflows/nightly-artifacts.yml
vendored
@@ -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 '<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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user