forked from bbbbbr/gimp-plugin-reduce-color-depth
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.61 KB
/
build_windows.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
name: Build Windows
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
# push:
# branches: [ main ]
# pull_request:
# branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
CI: true
jobs:
win:
strategy:
fail-fast: false
max-parallel: 2
matrix:
include: [
{msystem: MINGW32, toolchain: mingw-w64-i686, version: x32 },
{msystem: MINGW64, toolchain: mingw-w64-x86_64, version: x64 },
]
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Install msys2 build environment
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: false
install: base-devel git ${{ matrix.toolchain }}-toolchain ${{ matrix.toolchain }}-gimp
- run: git config --global core.autocrlf input
shell: bash
- uses: actions/checkout@v4
- name: Build plugin
shell: msys2 {0}
run: |
echo $(gimptool-2.0 -n --build src/main.c) | sh
mv main.exe plugin-gimp-reduce-colordepth-${{ matrix.version }}.exe
ls
- name: Get GIMP version
shell: msys2 {0}
run: echo "GIMPVER=$(pacman -Q ${{ matrix.toolchain }}-gimp | cut -d ' ' -f 2)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: plugin-gimp-reduce-colordepth_${{ env.GIMPVER }}_${{ matrix.version }}
path: |
./plugin-gimp-reduce-colordepth-${{ matrix.version }}.exe