Skip to content

added actions

added actions #1

name: Build and Release Packages
on:
push:
tags:
- "v*"
- "V*"
permissions:
contents: write
jobs:
linux-packages:
name: Linux Packages (AppImage, DEB, RPM)
runs-on: ubuntu-latest
env:
APP_NAME: GraphDigitizer
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
- name: Install packaging dependencies (deb/rpm/fpm)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
fakeroot rpm ruby ruby-dev rubygems build-essential xz-utils zsync wget
sudo gem install --no-document fpm
- name: Install appimagetool
run: |
set -euxo pipefail
wget -O appimagetool.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool.AppImage
./appimagetool.AppImage --appimage-extract
sudo mv squashfs-root/AppRun /usr/local/bin/appimagetool
sudo chmod +x /usr/local/bin/appimagetool
- name: Build with Maven
run: mvn -B -ntp -DskipTests package
- name: Derive version from tag
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
- name: Ensure scripts executable
run: chmod +x scripts/*.sh
- name: Generate DEB
run: ./scripts/generate-deb.sh "$VERSION"
- name: Generate RPM
run: ./scripts/generate-rpm.sh "$VERSION"
- name: Generate AppImage
run: ./scripts/generate-appimage.sh "$VERSION"
- name: Upload Linux artifacts to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/generated_builds/**/*.deb
target/generated_builds/**/*.rpm
target/generated_builds/**/*.AppImage
fail_on_unmatched_files: false
macos-dmg:
name: macOS DMG
runs-on: macos-latest
env:
APP_NAME: GraphDigitizer
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
- name: Build with Maven
run: mvn -B -ntp -DskipTests package
- name: Derive version from tag
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
- name: Ensure scripts executable
run: chmod +x scripts/*.sh
- name: Generate DMG
run: ./scripts/generate-dmg.sh "$VERSION"
- name: Upload macOS artifacts to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/generated_builds/**/*.dmg
fail_on_unmatched_files: false