Skip to content

Commit

Permalink
Add release gh-action
Browse files Browse the repository at this point in the history
  • Loading branch information
jensklose committed Jul 6, 2021
1 parent 95fd7db commit 6da4f94
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 8 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: release

on:
release:
types: [created]

jobs:
releases-linux:
name: Release Go Binary For Linux
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux]
goarch: ["386", amd64]
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/go-release-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://golang.org/dl/go1.16.5.linux-amd64.tar.gz"
extra_files: LICENSE README.md
releases-macos:
name: Release Go Binary For MacOS
runs-on: ubuntu-latest
strategy:
matrix:
goos: [darwin]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/go-release-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://golang.org/dl/go1.16.5.linux-amd64.tar.gz"
extra_files: LICENSE README.md
releases-windows:
name: Release Go Binary For Windows
runs-on: ubuntu-latest
strategy:
matrix:
goos: [windows]
goarch: [amd64]
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/go-release-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://golang.org/dl/go1.16.5.linux-amd64.tar.gz"
extra_files: LICENSE README.md
9 changes: 1 addition & 8 deletions .github/workflows/go.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go
name: Run Go Tests

on: [push, pull_request]

Expand All @@ -10,10 +10,6 @@ jobs:
go-version: [1.16]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v2
Expand All @@ -26,8 +22,5 @@ jobs:
with:
go-version: 1.16

- name: Build
run: go build -v ./...

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

0 comments on commit 6da4f94

Please sign in to comment.