diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 9f5a640a..64a826ab 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -47,4 +47,4 @@ jobs: run: | make clean-examples make examples - git diff --exit-code examples + git diff --exit-code examples \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5b715911..a9a655f0 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -58,6 +58,16 @@ builds: - darwin goarch: - arm64 + - <<: *build-common + id: oasis-windows-amd64 + binary: oasis.exe + env: + - CC=x86_64-w64-mingw32-gcc + - CXX=x86_64-w64-mingw32-g++ + goos: + - windows + goarch: + - amd64 archives: - name_template: "{{replace .ProjectName \" \" \"_\" | tolower}}_{{.Version}}_{{.Os}}_{{.Arch}}" @@ -66,6 +76,10 @@ archives: - oasis-linux-amd64 - oasis-linux-arm64 - oasis-darwin-universal + - oasis-windows-amd64 + format_overrides: + - goos: windows + format: zip checksum: name_template: SHA256SUMS-{{.Version}}.txt diff --git a/Makefile b/Makefile index e35e1aa0..d18b74f0 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,11 @@ all: build # Build. build: oasis + +build-windows: $(shell find . -name "*.go" -type f) go.sum go.mod + @$(PRINT) "$(MAGENTA)*** Building for Windows...$(OFF)\n" + GOOS=windows GOARCH=amd64 $(GO) build -v -o oasis.exe $(GOFLAGS) $(GO_EXTRA_FLAGS) + oasis: $(shell find . -name "*.go" -type f) go.sum go.mod @$(PRINT) "$(MAGENTA)*** Building Go code...$(OFF)\n" @$(GO) build -v -o oasis $(GOFLAGS) $(GO_EXTRA_FLAGS) @@ -83,3 +88,4 @@ clean: $(lint-targets) lint \ $(test-targets) test \ clean + windows