diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa10c2c..a05b994 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,28 +2,30 @@ name: Go on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] jobs: - build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.19 + - uses: actions/checkout@v3 - - name: Build - run: cd ./Golang && go build -o allinone + - name: Cross Compile + run: | + GOOS=windows GOARCH=amd64 go build -o allinone_windows_amd64.exe + GOOS=darwin GOARCH=amd64 go build -o allinone_darwin_amd64 + GOOS=linux GOARCH=arm64 go build -o allinone_linux_arm64 + GOOS=linux GOARCH=amd64 go build -o allinone_linux_amd64 - - name: Upload - uses: actions/upload-artifact@v3 - with: - files: allinone - name: allinone_linux_amd64 - path: Golang + - name: Upload Cross Compile Artifacts + uses: actions/upload-artifact@v3 + with: + files: | + allinone_windows_amd64.exe + allinone_darwin_amd64 + allinone_linux_arm64 + allinone_linux_amd64 + name: allinone_cross_compile + path: Golang/