-
Notifications
You must be signed in to change notification settings - Fork 2
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
1085679
commit 0d14319
Showing
2 changed files
with
45 additions
and
1 deletion.
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,41 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
name: Build and Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.16' # Make sure to use a valid Go version | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build Binary for Linux | ||
run: GOOS=linux GOARCH=amd64 go build -o hcp-calculator-linux-amd64 | ||
|
||
- name: Build Binary for Windows | ||
run: GOOS=windows GOARCH=amd64 go build -o hcp-calculator-windows-amd64.exe | ||
|
||
- name: Build Binary for macOS | ||
run: GOOS=darwin GOARCH=amd64 go build -o hcp-calculator-darwin-amd64 | ||
|
||
- name: Create Release and Upload Assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
hcp-calculator-linux-amd64 | ||
hcp-calculator-windows-amd64.exe | ||
hcp-calculator-darwin-amd64 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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