forked from Milerius/mm2-client
-
Notifications
You must be signed in to change notification settings - Fork 4
75 lines (68 loc) · 2.46 KB
/
release.yml
File metadata and controls
75 lines (68 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
name: Release
on:
push:
branches: [ main ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin, js]
goarch: [amd64, wasm]
exclude:
- goarch: wasm
goos: darwin
- goarch: wasm
goos: windows
- goarch: wasm
goos: linux
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Go Release Binaries (server)
uses: wangyoucao577/go-release-action@v1.20
if: matrix.goarch != 'wasm' && matrix.goos != 'js'
with:
goversion: 1.16
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
release_tag: dev
overwrite: true
md5sum: false
binary_name: mm2-tools-server
project_path: cmd/mm2_tools_server
ldflags: -X main.gitCommit=${{ github.sha }} -X main.gitRef=${{ github.ref }}
asset_name: "mm2-tools-server-dev-${{ matrix.goos }}-${{ matrix.goarch }}"
- name: Go Release Binaries (mm2-wasm)
uses: wangyoucao577/go-release-action@v1.20
if: matrix.goarch == 'wasm' && matrix.goos == 'js'
with:
goversion: 1.16
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
release_tag: dev
overwrite: true
md5sum: false
binary_name: mm2-tools.wasm
project_path: cmd/mm2_cli_wasm
pre_command: cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .
extra_files: wasm_exec.js cmd/mm2_cli_wasm/data/index.html cmd/mm2_cli_wasm/data/static
asset_name: "mm2-tools-dev-${{ matrix.goos }}-${{ matrix.goarch }}"
- name: Go Release Binaries (client)
uses: wangyoucao577/go-release-action@v1.20
if: matrix.goarch != 'wasm' && matrix.goos != 'js'
with:
goversion: 1.16
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
release_tag: dev
overwrite: true
md5sum: false
binary_name: mm2-tools-client
project_path: cmd/mm2_cli_native
ldflags: -X main.gitCommit=${{ github.sha }} -X main.gitRef=${{ github.ref }}
asset_name: "mm2-tools-client-dev-${{ matrix.goos }}-${{ matrix.goarch }}"