Skip to content

Commit 3bf9125

Browse files
authored
Update build-updater.yaml
1 parent 3dcf4e1 commit 3bf9125

1 file changed

Lines changed: 31 additions & 36 deletions

File tree

.github/workflows/build-updater.yaml

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build-updater-linux:
11-
name: "Build updater for linux"
11+
name: "Build updater for Linux"
1212
runs-on: ubuntu-latest
1313

1414
container:
@@ -18,68 +18,66 @@ jobs:
1818
UPDATER_DIR: ./updater
1919

2020
steps:
21-
- name: "Install packages"
21+
- name: Install packages
2222
run: apk update && apk add --no-cache gcc go
2323

2424
- uses: actions/checkout@v4
25-
with:
26-
sparse-checkout: updater
2725

28-
- name: "Create output path"
29-
working-directory: "${{env.UPDATER_DIR}}"
30-
run: mkdir -p ./output
26+
- name: Create output path
27+
working-directory: ${{ env.UPDATER_DIR }}
28+
run: mkdir -p output
3129

32-
- name: "Build (64 bit)"
33-
working-directory: "${{env.UPDATER_DIR}}"
30+
- name: Build (64 bit)
31+
working-directory: ${{ env.UPDATER_DIR }}
3432
env:
3533
CGO_ENABLED: 1
3634
GOARCH: amd64
3735
GOOS: linux
3836
run: |
3937
go build -ldflags '-linkmode external -extldflags "-static"' -o output/updater-linux-64
4038
41-
- name: "Upload build"
39+
- name: Upload build
4240
uses: actions/upload-artifact@v4
4341
with:
4442
name: updater-linux
45-
path: "${{env.UPDATER_DIR}}/output/*"
43+
path: ${{ env.UPDATER_DIR }}/output/*
4644
retention-days: 3
4745
compression-level: 9
4846

4947
build-updater-windows:
50-
name: "Build updater for windows"
48+
name: "Build updater for Windows"
5149
runs-on: windows-latest
5250

5351
env:
54-
UPDATER_DIR: ".\\updater"
52+
UPDATER_DIR: .\\updater
5553

5654
steps:
5755
- uses: actions/checkout@v3
5856

59-
- name: "Setup Go"
57+
- name: Setup Go
6058
uses: actions/setup-go@v4
6159
with:
6260
go-version: "1.21.3"
63-
cache-dependency-path: "${{env.UPDATER_DIR}}\\go.sum"
61+
cache-dependency-path: updater\\go.sum
6462

65-
- name: "Create output path"
66-
working-directory: "${{env.UPDATER_DIR}}"
67-
run: mkdir .\output
63+
- name: Create output path
64+
working-directory: ${{ env.UPDATER_DIR }}
65+
run: mkdir output
6866

69-
- name: "Build (64 bit)"
70-
working-directory: "${{env.UPDATER_DIR}}"
67+
- name: Build (64 bit)
68+
working-directory: ${{ env.UPDATER_DIR }}
7169
env:
7270
CGO_ENABLED: 1
7371
GOARCH: amd64
7472
GOOS: windows
7573
run: |
7674
go build -o output\\updater-windows-64.exe
7775
78-
- name: "Upload build"
76+
- name: Upload build
7977
uses: actions/upload-artifact@v4
8078
with:
8179
name: updater-windows
82-
path: "${{env.UPDATER_DIR}}\\output\\*"
80+
path: ${{ env.UPDATER_DIR }}\\output\\*
8381
retention-days: 3
8482
compression-level: 9
8583

@@ -91,43 +89,40 @@ jobs:
9189
UPDATER_DIR: ./updater
9290

9391
steps:
94-
- name: "Install packages"
95-
run: brew install libpcap || true
96-
97-
- name: "Setup Go"
92+
- name: Setup Go
9893
uses: actions/setup-go@v4
9994
with:
10095
go-version: "1.21.3"
101-
cache-dependency-path: "${{env.UPDATER_DIR}}/go.sum"
96+
cache-dependency-path: updater/go.sum
10297

10398
- uses: actions/checkout@v3
10499

105-
- name: "Create output path"
106-
working-directory: "${{env.UPDATER_DIR}}"
107-
run: mkdir -p ./output
100+
- name: Create output path
101+
working-directory: ${{ env.UPDATER_DIR }}
102+
run: mkdir -p output
108103

109-
- name: "Build (64 bit Intel)"
110-
working-directory: "${{env.UPDATER_DIR}}"
104+
- name: Build (Intel 64)
105+
working-directory: ${{ env.UPDATER_DIR }}
111106
env:
112107
CGO_ENABLED: 1
113108
GOARCH: amd64
114109
GOOS: darwin
115110
run: |
116111
go build -o output/updater-macos-64
117112
118-
- name: "Build (64 bit ARM/M1)"
119-
working-directory: "${{env.UPDATER_DIR}}"
113+
- name: Build (Apple M1/ARM64)
114+
working-directory: ${{ env.UPDATER_DIR }}
120115
env:
121116
CGO_ENABLED: 1
122117
GOARCH: arm64
123118
GOOS: darwin
124119
run: |
125120
go build -o output/updater-macos-m1-64
126121
127-
- name: "Upload build"
122+
- name: Upload build
128123
uses: actions/upload-artifact@v4
129124
with:
130125
name: updater-macos
131-
path: "${{env.UPDATER_DIR}}/output/*"
126+
path: ${{ env.UPDATER_DIR }}/output/*
132127
retention-days: 3
133128
compression-level: 9

0 commit comments

Comments
 (0)