Skip to content

Commit

Permalink
feat(ci): add windows (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaineK00n authored Feb 19, 2023
1 parent 70c52eb commit 7b84711
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ jobs:
-
name: Checkout
uses: actions/checkout@v3
-
name: install package for cross compile
run: sudo apt update && sudo apt install -y gcc-aarch64-linux-gnu
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version-file: go.mod
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker run --rm \
-e CGO_ENABLED=1 \
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/github.com/vulsio/go-msfdb \
-w /go/src/github.com/vulsio/go-msfdb \
ghcr.io/goreleaser/goreleaser-cross:v1.20 \
release --clean
20 changes: 20 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ builds:
main: .
ldflags: -s -w -X github.com/vulsio/go-msfdb/config.Version={{.Version}} -X github.com/vulsio/go-msfdb/config.Revision={{.Commit}}
binary: go-msfdb
- id: windows-amd64
goos:
- windows
goarch:
- amd64
env:
- CC=x86_64-w64-mingw32-gcc
main: .
ldflags: -s -w -X github.com/vulsio/go-msfdb/config.Version={{.Version}} -X github.com/vulsio/go-msfdb/config.Revision={{.Commit}}
binary: go-msfdb
- id: windows-arm64
goos:
- windows
goarch:
- arm64
env:
- CC=/llvm-mingw/bin/aarch64-w64-mingw32-gcc
main: .
ldflags: -s -w -X github.com/vulsio/go-msfdb/config.Version={{.Version}} -X github.com/vulsio/go-msfdb/config.Revision={{.Commit}}
binary: go-msfdb
archives:
- name_template: '{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
format: tar.gz
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vulsio/go-msfdb

go 1.18
go 1.20

require (
github.com/cheggaaa/pb/v3 v3.0.5
Expand Down

0 comments on commit 7b84711

Please sign in to comment.