-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (82 loc) · 2.46 KB
/
dev.yml
File metadata and controls
94 lines (82 loc) · 2.46 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Development Builds
on:
push:
branches: [ "develop" ]
jobs:
build_cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Build
run: mkdir bin; go build -o bin/snes2c64-cli-linux-amd64 snes2c64gui/cmd/cli
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: cli-binary
path: bin/
build_gui_linux:
runs-on: ubuntu-latest
container:
image: golang:1.19-buster
options: --user root --workdir /usr/src/snes2c64gui
steps:
- uses: actions/checkout@v3
- name: Get dependencies
run: apt-get update && apt-get install -y gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev libwayland-dev libxkbcommon-dev bc
- name: Build
run: mkdir bin; go build -buildvcs=false -o bin/snes2c64-gui-linux-amd64 snes2c64gui/cmd/gui
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: gui-binary
path: bin/
build_gui_windows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Get dependencies
run: go get github.com/fyne-io/fyne-cross
- name: Install fyne-cross
run: go install github.com/fyne-io/fyne-cross
- name: Build
run: mkdir bin; fyne-cross windows -output gui ./cmd/gui; mv fyne-cross/bin/windows-amd64/gui bin/snes2c64-gui-windows-amd64.exe
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: gui-binary
path: bin/snes2c64-gui-windows-amd64.exe
release:
runs-on: ubuntu-latest
needs:
[
build_cli,
build_gui_linux,
build_gui_windows
]
steps:
- name: Download cli binary
uses: actions/download-artifact@v3
with:
name: cli-binary
path: bin/
- name: Download gui binary
uses: actions/download-artifact@v3
with:
name: gui-binary
path: bin/
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Latest build on develop"
files: |
bin/*