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