Skip to content

Commit

Permalink
Release (#7)
Browse files Browse the repository at this point in the history
* Add release workflow

* Revert build workflow

Co-authored-by: adam <hello@admcpr.com>
  • Loading branch information
adam7 and adam authored Nov 27, 2022
1 parent 0f27e93 commit 02c5669
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Go

on:
push:
branches: [ "main" ]
branches: [ "main", "versions-and-release" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "versions-and-release" ]

jobs:
build_matrix:
Expand All @@ -13,7 +13,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
Expand All @@ -22,6 +22,6 @@ jobs:

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

# - name: Test
# run: go test -v ./...
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
release:
types: [created]

jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/amd64, linux/arm64, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.33
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "1.18"
extra_files: LICENSE README.md

0 comments on commit 02c5669

Please sign in to comment.