Skip to content

Create new appimage workflow #18

Create new appimage workflow

Create new appimage workflow #18

Workflow file for this run

name: Build MG AppImage
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
version:
description: 'version number'
required: false
type: string
push:
branches: develop
pull_request:
branches: develop
paths:
- '**appimage.yml'
jobs:
build-mg-appimage:
runs-on: ubuntu-latest
env:
VERSION: ${{ inputs.version }}
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- name: Checkout MegaGlest
uses: actions/checkout@v4
- name: Checkout Data
uses: actions/checkout@v4
with:
repository: "megaglest/megaglest-data"
path: "data/glest_game"
- if: ${{ ! contains(matrix.platform, 'amd64') }}
uses: docker/[email protected]
- name: Set variables
run: |
if [ -z "$VERSION" ]; then
echo "VERSION=snapshot" >> $GITHUB_ENV
fi
- name: Build AppImage
run: |
export HOSTUID=$(id -u) HOSTGID=$(id -g)
docker compose -f mk/linux/docker/docker-compose.yml run --rm build
env:
PLATFORM: ${{ matrix.platform }}
- name: Create sha256sum
run: |
for file in *.AppImage; do
sha256sum "$file" > "$file.sha256sum";
done
- name: Artifact Filename
run: |
PLATFORM=${{ matrix.platform }}
echo "ARTIFACT_NAME=AppImages-${PLATFORM//\//-}" >> $GITHUB_ENV
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./*AppImage*
if-no-files-found: error