-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (49 loc) · 1.4 KB
/
build.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
name: build
on: push
jobs:
build:
name: "Build Dungeondraft-GoPackager (${{ matrix.target.os }}, ${{ matrix.go-version }})"
runs-on: ${{ matrix.target.host || 'ubuntu-latest' }}
env:
GO111MODULE: on
strategy:
fail-fast: false
matrix:
go-version: ["1.23.x"]
target:
- os: linux
- os: windows
ext: .exe
host: windows-latest
- os: darwin
host: macos-latest
steps:
- name: Setup Go environment
id: setup-go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/.cache/fyne-cross
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/go.sum') }}
- name: Install Fyne
run: go install fyne.io/fyne/v2/cmd/fyne@latest
- name: install go deps
run: go mod download
- name: Build gui
run: |
fyne package \
${{ matrix.target.args }} \
--src ./cmd/dungeondraft-packager
ls -R fyne-cross
- name: Build cli
run: |
go build ./cmd/dungeondraft-packager-cli
ls .