Skip to content

Commit 146f641

Browse files
committed
fix release.yml
1 parent 38acf6f commit 146f641

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/release.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ jobs:
1414
steps:
1515
- name: Checkout project
1616
uses: actions/checkout@v4
17-
- name: Setup Go
18-
uses: actions/setup-go@v5
19-
with:
20-
go-version: '1.20.7' # go1.20.8+ refuses to build go1.22 code...
21-
- name: Build Windows 7
22-
run: |
23-
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags '-extldflags "-static"' -o croc.exe
24-
zip croc_${{ github.event.release.name }}_Windows7-64bit.zip croc.exe
25-
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags '-extldflags "-static"' -o croc.exe
26-
zip croc_${{ github.event.release.name }}_Windows7-32bit.zip croc.exe
2717
- name: Setup Go
2818
uses: actions/setup-go@v4
2919
with:
@@ -73,6 +63,20 @@ jobs:
7363
tar -czvf croc_${{ github.event.release.name }}_OpenBSD-64bit.tar.gz croc LICENSE
7464
CGO_ENABLED=0 GOOS=openbsd GOARCH=arm64 go build -ldflags '' -o croc
7565
tar -czvf croc_${{ github.event.release.name }}_OpenBSD-ARM64.tar.gz croc LICENSE
66+
- name: Setup Go
67+
uses: actions/setup-go@v5
68+
with:
69+
go-version: '1.20.7' # go1.20.8+ refuses to build go1.22 code...
70+
- name: Build Windows 7
71+
run: |
72+
go version
73+
rm go.mod go.sum
74+
go mod init github.com/schollz/croc/v10
75+
go mod tidy
76+
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags '-extldflags "-static"' -o croc.exe
77+
zip croc_${{ github.event.release.name }}_Windows7-64bit.zip croc.exe
78+
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags '-extldflags "-static"' -o croc.exe
79+
zip croc_${{ github.event.release.name }}_Windows7-32bit.zip croc.exe
7680
- name: Create checksums.txt
7781
run: |
7882
touch croc_${{ github.event.release.name }}_checksums.txt

0 commit comments

Comments
 (0)