-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 1.69 KB
/
go_build.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Go Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.4
- name: Build for Linux
run: GOOS=linux GOARCH=amd64 go build -o AuthInspector-linux-amd64
- name: Build for Windows
run: GOOS=windows GOARCH=amd64 go build -o AuthInspector-windows-amd64.exe
- name: Build for macOS
run: GOOS=darwin GOARCH=amd64 go build -o AuthInspector-darwin-amd64
- name: Archive binaries
uses: actions/upload-artifact@v2
with:
name: AuthInspector
path: |
AuthInspector-linux-amd64
AuthInspector-windows-amd64.exe
AuthInspector-darwin-amd64
# release:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Set up Git
# run: git config --global user.email "[email protected]" && git config --global user.name "GitHub Actions"
# - name: Create Tag
# run: git tag v${{ github.run_number }}
# - name: Push Tag
# run: git push origin v${{ github.run_number }}
# - name: Create Release
# id: create_release
# uses: softprops/action-gh-release@v1
# with:
# files: |
# ./AuthInspector/AuthInspector-linux-amd64
# ./AuthInspector/AuthInspector-windows-amd64.exe
# ./AuthInspector/AuthInspector-darwin-amd64
# tag_name: v${{ github.run_number }}
# draft: false
# prerelease: false
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}