Skip to content

Commit

Permalink
Merge pull request #92 from 178inaba/goreleaser
Browse files Browse the repository at this point in the history
Place the built binary on the release page
  • Loading branch information
xiantang committed Aug 2, 2020
2 parents 1e56563 + 32e83bb commit 3eda871
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 18 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

Expand All @@ -13,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.4
- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: ^1.14
Expand All @@ -27,3 +26,24 @@ jobs:

- name: Test
run: go test -v ./...

release:
name: Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v2
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
builds:
- goos:
- linux
- windows
- darwin
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,9 @@ The classic way to install
go get -u github.com/cosmtrek/air
```

### macOS
### macOS, Linux, Windows

```bash
curl -fLo air https://git.io/darwin_air
```

### Linux

```bash
curl -fLo air https://git.io/linux_air
```

### Windows

```bash
curl -fLo air.exe https://git.io/windows_air
```
The binary is published on the [release page](https://github.com/cosmtrek/air/releases).

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

Expand Down
Binary file removed bin/darwin/air
Binary file not shown.
Binary file removed bin/linux/air
Binary file not shown.
Binary file removed bin/windows/air.exe
Binary file not shown.

0 comments on commit 3eda871

Please sign in to comment.