Skip to content

Commit

Permalink
build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintWish committed Oct 4, 2024
1 parent 2146609 commit ee902ff
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: build

name: linux-build
on:
workflow_dispatch:

Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: win-build
on:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- name: checkout
uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: '^1.23'

- name: build
run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o build/nexus2_win -v .

- name: Install UPX
uses: crazy-max/ghaction-upx@v3
with:
install-only: true

- name: compress binary
run: upx build/nexus2_win && chmod +x build/nexus2_win

- name: upload binaries
uses: actions/upload-artifact@v4
with:
name: win_amd64
path: build/nexus2_win

0 comments on commit ee902ff

Please sign in to comment.