-
Notifications
You must be signed in to change notification settings - Fork 91
81 lines (72 loc) · 2.03 KB
/
appimage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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'
- '**/docker-compose.yml'
- '**/build-appimage.sh'
- '**/AppRun'
- '**/.env'
jobs:
build-mg-appimage:
runs-on: ${{ matrix.os }}
env:
VERSION: ${{ inputs.version }}
strategy:
matrix:
os:
- ubuntu-24.04-arm
- ubuntu-24.04
steps:
- name: Checkout MegaGlest
uses: actions/checkout@v4
- name: Checkout Data
uses: actions/checkout@v4
with:
repository: "megaglest/megaglest-data"
path: "data/glest_game"
- name: Build AppImage
run: |
export HOSTUID=$(id -u) HOSTGID=$(id -g)
docker compose -f mk/linux/docker/docker-compose.yml run --rm build
- name: Create sha256sum
run: |
for file in *.AppImage; do
sha256sum "$file" > "$file.sha256sum";
done
- name: Artifact Filename
run: |
PLATFORM=$(uname -m)
echo "ARTIFACT_NAME=AppImages-${PLATFORM//\//-}" >> $GITHUB_ENV
- if: ${{ github.ref != 'refs/heads/develop' }}
name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./*AppImage*
if-no-files-found: error
- if: ${{ github.ref == 'refs/heads/develop' }}
name: 'Prerelease'
uses: ncipollo/release-action@v1
with:
artifacts: "./*AppImage*"
body: "MegaGlest Snapshot Release"
allowUpdates: true
prerelease: true
removeArtifacts: false
replacesArtifacts: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
tag: snapshot