-
-
Notifications
You must be signed in to change notification settings - Fork 7
146 lines (145 loc) · 5.9 KB
/
release.yaml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
on:
release:
types: [created]
jobs:
release-wasm:
permissions: write-all
name: release js/wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1
with:
goversion: "1.21.6"
md5sum: FALSE
compress_assets: "zip"
github_token: ${{ secrets.GITHUB_TOKEN }}
pre_command: "apt-get update && apt-get install --no-install-recommends -y pkg-config libasound2-dev libx11-dev && ./internal/misc/build_index.sh ./assets && cp $(go env GOROOT)/misc/wasm/wasm_exec.js ./game_wasm/wasm_exec.js"
project_path: "./cmd/game_wasm"
binary_name: "eoe.wasm"
extra_files: "./assets/ ./cmd/game_wasm/index.html ./cmd/game_wasm/wasm_exec.js"
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'"
goos: js
goarch: wasm
release-linux-term-amd64:
permissions: write-all
name: release linux/amd64 term
runs-on: ubuntu-latest
env:
CGO_ENABLED: 1
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1
with:
md5sum: FALSE
github_token: ${{ secrets.GITHUB_TOKEN }}
pre_command: "apt-get update && apt-get install --no-install-recommends -y pkg-config libasound2-dev libx11-dev"
project_path: "./cmd/game"
binary_name: "end_of_eden_term"
extra_files: "./assets/"
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'"
goos: linux
goarch: amd64
release-linux-gl-amd64:
permissions: write-all
name: release linux/amd64 gl
runs-on: ubuntu-latest
env:
CGO_ENABLED: 1
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1
with:
md5sum: FALSE
github_token: ${{ secrets.GITHUB_TOKEN }}
pre_command: "apt-get update && apt-get install --no-install-recommends -y pkg-config libasound2-dev libx11-dev gcc libc6-dev libglu1-mesa-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev"
project_path: "./cmd/game_win"
binary_name: "end_of_eden_gl"
build_flags: "-tags ebitenginesinglethread"
extra_files: "./assets/"
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'"
goos: linux
goarch: amd64
release-windows-term-amd64:
permissions: write-all
name: release windows/amd64 term
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1
with:
md5sum: FALSE
github_token: ${{ secrets.GITHUB_TOKEN }}
project_path: "./cmd/game"
binary_name: "end_of_eden_term"
build_flags: "-tags ebitenginesinglethread"
extra_files: "./assets/"
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'"
goos: windows
goarch: amd64
release-windows-gl-amd64:
permissions: write-all
name: release windows/amd64 gl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1
with:
md5sum: FALSE
github_token: ${{ secrets.GITHUB_TOKEN }}
project_path: "./cmd/game_win"
binary_name: "end_of_eden_gl"
extra_files: "./assets/"
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'"
goos: windows
goarch: amd64
release-macos-term-amd64:
permissions: write-all
name: release macos/amd64 term
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch Go
uses: actions/setup-go@v4
with:
go-version: '^1.21'
- name: Build
run: |
go build -ldflags="-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'" -o end_of_eden -tags ebitenginesinglethread ./cmd/game
export BIN=end_of_eden_term-$(basename ${GITHUB_REF})-macos-amd64
mkdir $BIN
cp ./end_of_eden $BIN/end_of_eden
cp -r ./assets $BIN/assets/
zip -r $BIN.zip $BIN
- name: Release
uses: softprops/action-gh-release@v1
with:
files: end_of_eden_term-${{ github.ref_name }}-macos-amd64.zip
release-macos-gl-amd64:
permissions: write-all
name: release macos/amd64 gl
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch XCode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Fetch Go
uses: actions/setup-go@v4
with:
go-version: '^1.21'
- name: Build
run: |
go build -ldflags="-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'" -o end_of_eden -tags ebitenginesinglethread ./cmd/game_win
export BIN=end_of_eden_gl-$(basename ${GITHUB_REF})-macos-amd64
mkdir $BIN
cp ./end_of_eden $BIN/end_of_eden
cp -r ./assets $BIN/assets/
zip -r $BIN.zip $BIN
- name: Release
uses: softprops/action-gh-release@v1
with:
files: end_of_eden_gl-${{ github.ref_name }}-macos-amd64.zip