From d4759702b90fd4efedc9f3e641c33c7618ed3b8a Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:19:38 -0400 Subject: [PATCH] Create build-windows.yml First attempt at building via GH Actions --- .github/workflows/build-windows.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..398c5b8 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,33 @@ +name: build-windows + +on: + push: + paths: + - "src/*.go" + - "src/go.mod" + - "src/go.sum" + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup + uses: actions/setup-go@v5 + with: + go-version: '>=1.22' + check-latest: true + + - name: Build + run: go build -ldflags="-s -w -H=windowsgui -extldflags=-static" -o Picocrypt.exe src/Picocrypt.go + env: + CGO_ENABLED: 1 + + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: build-windows + path: Picocrypt.exe + if-no-files-found: error + compression-level: 9