tiny fix #15
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
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.21.0" | |
- name: Build | |
run: | | |
build() { | |
export GOOS=$1 | |
export GOARCH=$2 | |
go build -ldflags "-s -w" -o build/copy-cert-${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/* |