-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9576cd
commit 1d9ca19
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Run Tests | ||
run: go test -v ./... | ||
|
||
release: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Build for Linux | ||
run: | | ||
GOOS=linux GOARCH=amd64 go build -o tobey-linux-amd64 | ||
GOOS=linux GOARCH=arm64 go build -o tobey-linux-arm64 | ||
- name: Build for macOS | ||
run: | | ||
GOOS=darwin GOARCH=amd64 go build -o tobey-darwin-amd64 | ||
GOOS=darwin GOARCH=arm64 go build -o tobey-darwin-arm64 | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
tobey-linux-amd64 | ||
tobey-linux-arm64 | ||
tobey-darwin-amd64 | ||
tobey-darwin-arm64 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |