forked from virusdefender/copy-cert
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 875 Bytes
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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.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/upload-artifact@v4
with:
path: build/*
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/*