-
Notifications
You must be signed in to change notification settings - Fork 30
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
9ee4f1b
commit 03e24a2
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,42 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
tags: ["v*.*.*"] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Build | ||
run: | | ||
build() { | ||
export GOOS=$1 | ||
export GOARCH=$2 | ||
go build -ldflags "-s -w" -o build/cert-copier-${1}-${2}${3} main.go | ||
} | ||
build linux amd64 | ||
build windows amd64 .exe | ||
build windows 386 .exe | ||
build darwin amd64 | ||
build darwin arm64 | ||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
path: build/* | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: build/* |
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