Skip to content

Commit bed6218

Browse files
authored
Merge pull request #352 from square/nunger.disable-cgo-via-go-env
Fix Windows build
2 parents 52e4b35 + c30a3d6 commit bed6218

File tree

4 files changed

+173
-7
lines changed

4 files changed

+173
-7
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: compilecheck.yaml
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
name: Compile Check
12+
strategy:
13+
matrix:
14+
version: ['stable']
15+
target:
16+
- {os: 'darwin', platform: 'macos-latest', arch: 'amd64'}
17+
- {os: 'linux', platform: 'ubuntu-latest', arch: 'amd64'}
18+
- {os: 'windows', platform: 'windows-latest', arch: 'amd64'}
19+
runs-on: ${{ matrix.target.platform }}
20+
permissions:
21+
contents: write
22+
steps:
23+
- name: Setup Go environment
24+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # ratchet:actions/setup-go@v5
25+
with:
26+
go-version: ${{ matrix.version }}
27+
check-latest: true
28+
id: go
29+
- name: Checkout
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
31+
- name: Build binary
32+
run: |
33+
go env -w CGO_ENABLED=0
34+
go build -o certigo .

.github/workflows/release.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ jobs:
2828
- name: Checkout
2929
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
3030
- name: Build binary
31-
run: CGO_ENABLED=0 go build -o certigo .
31+
run: |
32+
go env -w CGO_ENABLED=0
33+
go build -o certigo .
3234
- name: Upload a Build Artifact
3335
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4
3436
with:

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ require (
1111
github.com/mattn/go-colorable v0.1.14
1212
github.com/mwitkow/go-http-dialer v0.0.0-20161116154839-378f744fb2b8
1313
github.com/stretchr/testify v1.10.0
14-
github.com/zmap/zcrypto v0.0.0-20250710172053-7835e31ca584
15-
github.com/zmap/zlint/v3 v3.6.7
14+
github.com/zmap/zcrypto v0.0.0-20240803002437-3a861682ac77
15+
github.com/zmap/zlint/v3 v3.6.5
1616
golang.org/x/crypto v0.40.0
1717
software.sslmate.com/src/go-pkcs12 v0.6.0
1818
)

0 commit comments

Comments
 (0)