appimage: Use linuxdeploy-build-helper-container (remove focal build-env) #77
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build AppImage | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 09 * * 5' | |
pull_request: | |
branches: master | |
paths: | |
- '**/appimage.yml' | |
- '**/AppRun' | |
jobs: | |
build-appimage: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: [amd64, arm64] | |
steps: | |
- name: Set version | |
run: | | |
VERSION="$(echo ${GITHUB_SHA} | head -c 7)-$(date +%y%m%d%H%M)" | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build AppImage | |
uses: andy5995/linuxdeploy-build-helper@v1 | |
with: | |
platform: ${{ matrix.platform }} | |
dependency_commands: | | |
sudo apt install -y \ | |
gettext \ | |
liblua5.1-0-dev \ | |
libphysfs-dev \ | |
libsdl2-dev \ | |
libsdl2-mixer-dev \ | |
libsdl2-ttf-dev | |
build_commands: | | |
./setup-build.sh _build \ | |
-Dbuildtype=release \ | |
-Dstrip=true \ | |
-Db_sanitize=none \ | |
-Dprefix=/usr | |
install_to_appdir_commands: | | |
meson install --destdir=$APPDIR --skip-subprojects | |
linuxdeploy_output_version: $VERSION | |
linuxdeploy_args: | | |
-d support/win32/netpanzer.desktop \ | |
--custom-apprun=support/appimage/AppRun \ | |
--icon-file=netpanzer.png \ | |
--icon-filename=netpanzer \ | |
--executable $APPDIR/usr/bin/netpanzer \ | |
--output appimage | |
- name: Create sha256sum | |
run: | | |
cd out | |
sha256sum $IMAGE_FILENAME > $IMAGE_FILENAME.sha256sum | |
- if: ${{ github.ref == 'refs/heads/master' }} | |
name: Release AppImage | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
name: NetPanzer Weekly AppImage (Unstable) | |
prerelease: true | |
draft: false | |
artifacts: ./out/* | |
token: ${{ secrets.GITHUB_TOKEN }} | |
omitBody: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
tag: appimage-weekly | |
removeArtifacts: ${{ matrix.platform == 'amd64' }} | |
- if: ${{ github.ref != 'refs/heads/master' }} | |
name: Upload AppImage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.IMAGE_FILENAME }} | |
path: ./out/* | |
if-no-files-found: error |