Skip to content

Commit 3eda871

Browse files
authored
Merge pull request #92 from 178inaba/goreleaser
Place the built binary on the release page
2 parents 1e56563 + 32e83bb commit 3eda871

File tree

6 files changed

+29
-18
lines changed

6 files changed

+29
-18
lines changed

.github/workflows/go.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Go
22

33
on:
44
push:
5-
branches: [ master ]
65
pull_request:
76
branches: [ master ]
87

@@ -13,7 +12,7 @@ jobs:
1312
runs-on: ubuntu-latest
1413
steps:
1514

16-
- name: Set up Go 1.4
15+
- name: Set up Go 1.14
1716
uses: actions/setup-go@v2
1817
with:
1918
go-version: ^1.14
@@ -27,3 +26,24 @@ jobs:
2726

2827
- name: Test
2928
run: go test -v ./...
29+
30+
release:
31+
name: Release
32+
runs-on: ubuntu-latest
33+
if: startsWith(github.ref, 'refs/tags/v')
34+
needs:
35+
- build
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
with:
40+
fetch-depth: 0
41+
- name: Setup Go
42+
uses: actions/setup-go@v2
43+
- name: Run GoReleaser
44+
uses: goreleaser/goreleaser-action@v2
45+
with:
46+
version: latest
47+
args: release --rm-dist
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
builds:
2+
- goos:
3+
- linux
4+
- windows
5+
- darwin

README.md

+2-16
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,9 @@ The classic way to install
3636
go get -u github.com/cosmtrek/air
3737
```
3838

39-
### macOS
39+
### macOS, Linux, Windows
4040

41-
```bash
42-
curl -fLo air https://git.io/darwin_air
43-
```
44-
45-
### Linux
46-
47-
```bash
48-
curl -fLo air https://git.io/linux_air
49-
```
50-
51-
### Windows
52-
53-
```bash
54-
curl -fLo air.exe https://git.io/windows_air
55-
```
41+
The binary is published on the [release page](https://github.com/cosmtrek/air/releases).
5642

5743
P.S. Great thanks mattn's [PR](https://github.com/cosmtrek/air/pull/1) for supporting Windows platform.
5844

bin/darwin/air

-3.54 MB
Binary file not shown.

bin/linux/air

-3.6 MB
Binary file not shown.

bin/windows/air.exe

-3.72 MB
Binary file not shown.

0 commit comments

Comments
 (0)