mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-03-30 04:31:04 +02:00
67
.github/workflows/nightly-artifacts.yml
vendored
67
.github/workflows/nightly-artifacts.yml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- test-mac
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "20 2 * * *"
|
- cron: "20 2 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -152,3 +153,69 @@ jobs:
|
|||||||
name: linux-appimage
|
name: linux-appimage
|
||||||
path: dist/praktiKST-*-linux-x86_64.AppImage
|
path: dist/praktiKST-*-linux-x86_64.AppImage
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
|
build-macos-dmg:
|
||||||
|
name: Build macOS DMG (${{ matrix.os }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, macos-15-intel]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4.1.7
|
||||||
|
|
||||||
|
- name: Resolve nightly version info
|
||||||
|
run: |
|
||||||
|
VERSION=$(grep -m1 '<version>' pom.xml | sed 's/.*<version>\(.*\)<\/version>.*/\1/')
|
||||||
|
SHORT_SHA="${GITHUB_SHA::7}"
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||||
|
echo "SHORT_SHA=$SHORT_SHA" >> "$GITHUB_ENV"
|
||||||
|
echo "ASSET_BASENAME=praktiKST-${VERSION}-${SHORT_SHA}" >> "$GITHUB_ENV"
|
||||||
|
echo "ARCH=$ARCH" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Set up Java 17
|
||||||
|
uses: actions/setup-java@v4.1.0
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: "17"
|
||||||
|
|
||||||
|
- name: Ensure mvnw is executable
|
||||||
|
run: chmod +x mvnw
|
||||||
|
|
||||||
|
- name: Build JAR and copy runtime dependencies
|
||||||
|
run: |
|
||||||
|
./mvnw -B -DskipTests package dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=target/dist-libs
|
||||||
|
cp "$(ls -t target/praktiKST-*.jar | head -n 1)" target/dist-libs/app.jar
|
||||||
|
|
||||||
|
- name: Build macOS DMG with jpackage
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
jpackage \
|
||||||
|
--type dmg \
|
||||||
|
--name praktiKST \
|
||||||
|
--input target/dist-libs \
|
||||||
|
--main-jar app.jar \
|
||||||
|
--main-class kst4contest.view.Kst4ContestApplication \
|
||||||
|
--module-path target/dist-libs \
|
||||||
|
--add-modules javafx.controls,javafx.graphics,javafx.fxml,javafx.web,javafx.media,java.sql \
|
||||||
|
--dest dist
|
||||||
|
|
||||||
|
env:
|
||||||
|
MACOSX_DEPLOYMENT_TARGET: "13.0"
|
||||||
|
|
||||||
|
- name: Rename DMG artifact
|
||||||
|
run: |
|
||||||
|
DMG=$(ls dist/*.dmg | head -n 1)
|
||||||
|
if [ -z "$DMG" ]; then
|
||||||
|
echo "No DMG produced by jpackage" && exit 1
|
||||||
|
fi
|
||||||
|
mv "$DMG" "dist/${ASSET_BASENAME}-macos-${ARCH}.dmg"
|
||||||
|
|
||||||
|
- name: Upload macOS artifact
|
||||||
|
uses: actions/upload-artifact@v4.3.4
|
||||||
|
with:
|
||||||
|
name: macos-dmg-${{ matrix.os }}
|
||||||
|
path: dist/praktiKST-*-macos-*.dmg
|
||||||
|
retention-days: 14
|
||||||
|
|||||||
65
.github/workflows/tagged-release.yml
vendored
65
.github/workflows/tagged-release.yml
vendored
@@ -134,6 +134,62 @@ jobs:
|
|||||||
name: linux-appimage
|
name: linux-appimage
|
||||||
path: dist/praktiKST-${{ github.ref_name }}-linux-x86_64.AppImage
|
path: dist/praktiKST-${{ github.ref_name }}-linux-x86_64.AppImage
|
||||||
|
|
||||||
|
build-macos-dmg:
|
||||||
|
name: Build macOS DMG (${{ matrix.os }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, macos-15-intel]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4.1.7
|
||||||
|
|
||||||
|
- name: Set up Java 17
|
||||||
|
uses: actions/setup-java@v4.1.0
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: "17"
|
||||||
|
|
||||||
|
- name: Ensure mvnw is executable
|
||||||
|
run: chmod +x mvnw
|
||||||
|
|
||||||
|
- name: Build JAR and copy runtime dependencies
|
||||||
|
run: |
|
||||||
|
./mvnw -B -DskipTests package dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=target/dist-libs
|
||||||
|
cp "$(ls -t target/praktiKST-*.jar | head -n 1)" target/dist-libs/app.jar
|
||||||
|
|
||||||
|
- name: Build macOS DMG with jpackage
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
jpackage \
|
||||||
|
--type dmg \
|
||||||
|
--name praktiKST \
|
||||||
|
--input target/dist-libs \
|
||||||
|
--main-jar app.jar \
|
||||||
|
--main-class kst4contest.view.Kst4ContestApplication \
|
||||||
|
--module-path target/dist-libs \
|
||||||
|
--add-modules javafx.controls,javafx.graphics,javafx.fxml,javafx.web,javafx.media,java.sql \
|
||||||
|
--dest dist
|
||||||
|
|
||||||
|
env:
|
||||||
|
MACOSX_DEPLOYMENT_TARGET: "13.0"
|
||||||
|
|
||||||
|
- name: Rename DMG artifact
|
||||||
|
run: |
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
DMG=$(ls dist/*.dmg | head -n 1)
|
||||||
|
if [ -z "$DMG" ]; then
|
||||||
|
echo "No DMG produced by jpackage" && exit 1
|
||||||
|
fi
|
||||||
|
mv "$DMG" "dist/praktiKST-${{ github.ref_name }}-macos-${ARCH}.dmg"
|
||||||
|
|
||||||
|
- name: Upload macOS artifact
|
||||||
|
uses: actions/upload-artifact@v4.3.4
|
||||||
|
with:
|
||||||
|
name: macos-dmg-${{ matrix.os }}
|
||||||
|
path: dist/praktiKST-${{ github.ref_name }}-macos-*.dmg
|
||||||
|
|
||||||
build-docs-pdf:
|
build-docs-pdf:
|
||||||
name: Build Documentation PDF
|
name: Build Documentation PDF
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -217,6 +273,7 @@ jobs:
|
|||||||
needs:
|
needs:
|
||||||
- build-windows-zip
|
- build-windows-zip
|
||||||
- build-linux-appimage
|
- build-linux-appimage
|
||||||
|
- build-macos-dmg
|
||||||
- build-docs-pdf
|
- build-docs-pdf
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -232,6 +289,13 @@ jobs:
|
|||||||
name: linux-appimage
|
name: linux-appimage
|
||||||
path: release-assets/linux
|
path: release-assets/linux
|
||||||
|
|
||||||
|
- name: Download macOS artifacts
|
||||||
|
uses: actions/download-artifact@v4.1.3
|
||||||
|
with:
|
||||||
|
pattern: macos-dmg-*
|
||||||
|
merge-multiple: true
|
||||||
|
path: release-assets/macos
|
||||||
|
|
||||||
- name: Download PDF manuals
|
- name: Download PDF manuals
|
||||||
uses: actions/download-artifact@v4.1.3
|
uses: actions/download-artifact@v4.1.3
|
||||||
with:
|
with:
|
||||||
@@ -252,5 +316,6 @@ jobs:
|
|||||||
artifacts: >-
|
artifacts: >-
|
||||||
release-assets/windows/praktiKST-${{ github.ref_name }}-windows-x64.zip,
|
release-assets/windows/praktiKST-${{ github.ref_name }}-windows-x64.zip,
|
||||||
release-assets/linux/praktiKST-${{ github.ref_name }}-linux-x86_64.AppImage,
|
release-assets/linux/praktiKST-${{ github.ref_name }}-linux-x86_64.AppImage,
|
||||||
|
release-assets/macos/praktiKST-${{ github.ref_name }}-macos-*.dmg,
|
||||||
release-assets/docs/KST4Contest-${{ github.ref_name }}-manual-en.pdf,
|
release-assets/docs/KST4Contest-${{ github.ref_name }}-manual-en.pdf,
|
||||||
release-assets/docs/KST4Contest-${{ github.ref_name }}-manual-de.pdf
|
release-assets/docs/KST4Contest-${{ github.ref_name }}-manual-de.pdf
|
||||||
|
|||||||
Reference in New Issue
Block a user