Create new appimage workflow #20
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 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/setup-qemu-action@v3 | |
- 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 }} | |
CC: clang | |
CXX: clang++ | |
- 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 |