File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,54 @@ jobs:
219
219
name : IP Check
220
220
run : make test-ip
221
221
222
+ build-windows-7 :
223
+ name : Build Windows 7 with GO 1.20
224
+ runs-on : ubuntu-latest
225
+ # needs: [version]
226
+ steps :
227
+ -
228
+ name : Checkout
229
+ uses : actions/checkout@v4
230
+ -
231
+ name : Setup go
232
+ uses : actions/setup-go@v5
233
+ with :
234
+ go-version : ' ^1.20.14'
235
+ check-latest : false
236
+ cache : false
237
+ -
238
+ name : Replace go version in go.mod
239
+ uses : jacobtomlinson/gha-find-replace@v3
240
+ with :
241
+ find : " ^go\\ s[0-9\\ .]+$"
242
+ replace : " go 1.20.14"
243
+ include : " go.mod"
244
+ -
245
+ name : Build binaries
246
+ env :
247
+ VERSION : 1.2.3
248
+ shell : bash
249
+ # 2 is the number of virtual cpus for Linux. macOS is 3.
250
+ run : make -j2 build-windows-amd64-win7
251
+ -
252
+ name : Upload artifacts
253
+ uses : actions/upload-artifact@v4
254
+ with :
255
+ name : binaries-windows
256
+ path : build/
257
+ # -
258
+ # name: Remove tag if failure
259
+ # if: ${{ failure() }}
260
+ # uses: actions/github-script@v7
261
+ # with:
262
+ # github-token: ${{ github.token }}
263
+ # script: |
264
+ # github.rest.git.deleteRef({
265
+ # owner: context.repo.owner,
266
+ # repo: context.repo.repo,
267
+ # ref: "tags/${{ needs.version.outputs.semver_tag }}"
268
+ # })
269
+
222
270
version :
223
271
name : Version
224
272
concurrency : tagging
Original file line number Diff line number Diff line change @@ -120,6 +120,9 @@ build-windows-386:
120
120
build-windows-amd64 :
121
121
GOOS=windows GOARCH=amd64 $(MAKE ) build-windows
122
122
123
+ build-windows-amd64-win7 :
124
+ GOOS=windows GOARCH=amd64 $(MAKE ) build-windows-7
125
+
123
126
build-windows-arm64 :
124
127
GOOS=windows GOARCH=arm64 $(MAKE ) build-windows
125
128
@@ -135,6 +138,12 @@ build-windows:
135
138
-ldflags " ${LD_FLAGS} -X ${REPO} /pkg/version.OS=$( GOOS) -X ${REPO} /pkg/version.Arch=$( GOARCH) " \
136
139
-o ${BUILD_DIR} /$(BINARY_NAME ) -$(GOOS ) -$(GOARCH ) .exe
137
140
141
+ .PHONY : build-windows-7
142
+ build-windows-7 :
143
+ CGO_ENABLED=$(CGO_ENABLED ) GOOS=$(GOOS ) GOARCH=$(GOARCH ) $(GOBUILD ) -v \
144
+ -ldflags " ${LD_FLAGS} -X ${REPO} /pkg/version.OS=$( GOOS) -X ${REPO} /pkg/version.Arch=$( GOARCH) " \
145
+ -o ${BUILD_DIR} /$(BINARY_NAME ) -$(GOOS ) -$(GOARCH ) -win7.exe
146
+
138
147
install : install-go-modules install-linter
139
148
140
149
.PHONY : install-linter
You can’t perform that action at this time.
0 commit comments