From fe83ec5fa891dcfc8f109a9455fd8f6342cf19bf Mon Sep 17 00:00:00 2001 From: W01fh4cker <101872898+W01fh4cker@users.noreply.github.com> Date: Sun, 19 Nov 2023 23:23:24 +0800 Subject: [PATCH] Create go.yml --- .github/workflows/go.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..04199dc --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,34 @@ +name: Build Go Project + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + go-version: [1.17] + os: [windows, macOS, ubuntu] + arch: [amd64, arm64] + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Build + run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build main.go + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: main-${{ matrix.os }}-${{ matrix.arch }} + path: ./main