-
Notifications
You must be signed in to change notification settings - Fork 3
116 lines (92 loc) · 2.53 KB
/
release.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
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
name: Release
on:
push:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: cargo build --release
- name: Rename binary
run: mv target/release/gut target/release/gut-linux
- name: Upload Linux Artifact
uses: actions/upload-artifact@v2
with:
name: linux-binary
path: target/release/gut-linux
build_windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: cargo build --release
- name: Upload Windows Artifact
uses: actions/upload-artifact@v2
with:
name: windows-binary
path: target\release\gut.exe
build_macos_x86:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: cargo build --release
- name: Rename binary
run: mv target/release/gut target/release/gut-macos-x86
- name: Upload MacOS Artifact
uses: actions/upload-artifact@v2
with:
name: macos-x86-binary
path: target/release/gut-macos-x86
build_macos_aarch64:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: cargo build --release
- name: Rename binary
run: mv target/release/gut target/release/gut-macos-aarch64
- name: Upload MacOS Artifact
uses: actions/upload-artifact@v2
with:
name: macos-aarch64-binary
path: target/release/gut-macos-aarch64
release_all:
runs-on: ubuntu-latest
needs: [build_linux, build_windows, build_macos_x86, build_macos_aarch64]
steps:
- name: Download Linux Artifact
uses: actions/download-artifact@v2
with:
name: linux-binary
- name: Download Windows Artifact
uses: actions/download-artifact@v2
with:
name: windows-binary
- name: Download MacOS (x86) Artifact
uses: actions/download-artifact@v2
with:
name: macos-x86-binary
- name: Download MacOS (Arm64) Artifact
uses: actions/download-artifact@v2
with:
name: macos-aarch64-binary
- name: Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
files: |
gut-linux
gut.exe
gut-macos-x86
gut-macos-aarch64