summaryrefslogtreecommitdiff
path: root/.github/workflows/packages.yml
blob: 779491aecee694330a45a99d8674906221ebc4b6 (plain) (blame)
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
name: Packages
on: [push, pull_request]

jobs:
  msys2-ucrt64:
    runs-on: windows-latest
    defaults:
      run:
        shell: msys2 {0}
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true

      - uses: msys2/setup-msys2@v2
        with:
          msystem: UCRT64
          update: true
          install: >
            git
            mingw-w64-ucrt-x86_64-gcc
            mingw-w64-ucrt-x86_64-cmake
            mingw-w64-ucrt-x86_64-physfs
            mingw-w64-ucrt-x86_64-curl-winssl
            mingw-w64-ucrt-x86_64-SDL2_image
            mingw-w64-ucrt-x86_64-SDL2_mixer
            mingw-w64-ucrt-x86_64-SDL2_net
            mingw-w64-ucrt-x86_64-SDL2_ttf
            mingw-w64-ucrt-x86_64-libxml2
            mingw-w64-ucrt-x86_64-nsis

      - name: CI-Build
        run: |
          cmake -B build . -DUSE_SYSTEM_GUICHAN=OFF -DCMAKE_BUILD_TYPE=Release
          cmake --build build
          pushd build
          cpack

      - uses: actions/upload-artifact@v4
        with:
          name: Mana installer for Windows (64-bit)
          path: build/Mana-*-win64.exe

  snap:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true

      - uses: snapcore/action-build@v1
        id: snapcraft

      - uses: actions/upload-artifact@v4
        if: ${{ failure() }}
        with:
          name: snapcraft.log
          path: '/home/runner/.local/state/snapcraft/log/*.log'

      - uses: actions/upload-artifact@v4
        with:
          name: mana_amd64.snap
          path: ${{ steps.snapcraft.outputs.snap }}