ci: add AppImage build job to release workflow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
87eabc9372
commit
0a88d063f9
1 changed files with 56 additions and 0 deletions
56
.github/workflows/release.yml
vendored
56
.github/workflows/release.yml
vendored
|
|
@ -54,6 +54,62 @@ jobs:
|
|||
run: |
|
||||
gh release upload ${{ github.ref_name }} H7CAD.flatpak --clobber --repo ${{ github.repository }}
|
||||
|
||||
build-appimage:
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -q
|
||||
sudo apt-get install -y \
|
||||
libgl1-mesa-dev libx11-dev libxcursor-dev libxi-dev libxrandr-dev \
|
||||
libxkbcommon-dev libwayland-dev libfontconfig1-dev libfreetype6-dev \
|
||||
librsvg2-bin fuse libfuse2
|
||||
|
||||
- name: Build
|
||||
run: cargo build --release
|
||||
|
||||
- name: Prepare AppDir
|
||||
run: |
|
||||
mkdir -p AppDir/usr/bin
|
||||
mkdir -p AppDir/usr/share/applications
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
|
||||
cp target/release/H7CAD AppDir/usr/bin/H7CAD
|
||||
cp flatpak/io.github.HakanSeven12.H7CAD.desktop AppDir/usr/share/applications/
|
||||
rsvg-convert -w 256 -h 256 assets/logo.svg \
|
||||
-o AppDir/usr/share/icons/hicolor/256x256/apps/io.github.HakanSeven12.H7CAD.png
|
||||
|
||||
- name: Download linuxdeploy
|
||||
run: |
|
||||
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
chmod +x linuxdeploy-x86_64.AppImage
|
||||
|
||||
- name: Build AppImage
|
||||
env:
|
||||
APPIMAGE_EXTRACT_AND_RUN: 1
|
||||
run: |
|
||||
./linuxdeploy-x86_64.AppImage \
|
||||
--appdir AppDir \
|
||||
--desktop-file flatpak/io.github.HakanSeven12.H7CAD.desktop \
|
||||
--icon-file AppDir/usr/share/icons/hicolor/256x256/apps/io.github.HakanSeven12.H7CAD.png \
|
||||
--output appimage
|
||||
mv H7CAD*.AppImage H7CAD.AppImage
|
||||
|
||||
- name: Upload AppImage to release
|
||||
if: github.event_name == 'release'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload ${{ github.ref_name }} H7CAD.AppImage --clobber --repo ${{ github.repository }}
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
|
|
|
|||
Loading…
Reference in a new issue