11name : Build updater
22
3- permissions :
4- contents : read
5-
63on :
74 workflow_dispatch :
85 pull_request :
@@ -15,23 +12,26 @@ jobs:
1512 runs-on : ubuntu-latest
1613
1714 steps :
18- - uses : actions/checkout@v4
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+ token : ${{ secrets.GITHUB_TOKEN }}
1920
20- - name : Set up Go (v4, with module caching)
21+ - name : Set up Go
2122 uses : actions/setup-go@v4
2223 with :
2324 go-version : ' 1.21.3'
24- cache : modules
2525
26- - name : Create output dir
26+ - name : Make output dir
2727 run : mkdir -p updater/output
2828
29- - name : Build (Linux amd64)
29+ - name : Build (linux/ amd64)
3030 run : |
3131 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
3232 go build -o updater/output/updater-linux-64 ./updater
3333
34- - name : Upload Linux artifact
34+ - name : Upload artifact
3535 uses : actions/upload-artifact@v4
3636 with :
3737 name : updater-linux
@@ -42,25 +42,28 @@ jobs:
4242 runs-on : windows-latest
4343
4444 steps :
45- - uses : actions/checkout@v4
45+ - name : Checkout code
46+ uses : actions/checkout@v4
47+ with :
48+ fetch-depth : 0
49+ token : ${{ secrets.GITHUB_TOKEN }}
4650
47- - name : Set up Go (v4, with module caching)
51+ - name : Set up Go
4852 uses : actions/setup-go@v4
4953 with :
5054 go-version : ' 1.21.3'
51- cache : modules
5255
53- - name : Create output dir
56+ - name : Make output dir
5457 shell : pwsh
5558 run : New-Item -ItemType Directory -Path updater\output -Force
5659
57- - name : Build (Windows amd64)
60+ - name : Build (windows/ amd64)
5861 shell : pwsh
5962 run : |
60- $Env:CGO_ENABLED = '0'
63+ $Env:CGO_ENABLED= '0'
6164 go build -o updater\output\updater-windows-64.exe ./updater
6265
63- - name : Upload Windows artifact
66+ - name : Upload artifact
6467 uses : actions/upload-artifact@v4
6568 with :
6669 name : updater-windows
@@ -71,15 +74,18 @@ jobs:
7174 runs-on : macos-latest
7275
7376 steps :
74- - uses : actions/checkout@v4
77+ - name : Checkout code
78+ uses : actions/checkout@v4
79+ with :
80+ fetch-depth : 0
81+ token : ${{ secrets.GITHUB_TOKEN }}
7582
76- - name : Set up Go (v4, with module caching)
83+ - name : Set up Go
7784 uses : actions/setup-go@v4
7885 with :
7986 go-version : ' 1.21.3'
80- cache : modules
8187
82- - name : Create output dir
88+ - name : Make output dir
8389 run : mkdir -p updater/output
8490
8591 - name : Build (macOS Intel)
9298 CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 \
9399 go build -o updater/output/updater-macos-m1-64 ./updater
94100
95- - name : Upload macOS artifact
101+ - name : Upload artifact
96102 uses : actions/upload-artifact@v4
97103 with :
98104 name : updater-macos
0 commit comments