From 7e6b8f89ccf66c9826ff2fe997ba7b60d27ab9ff Mon Sep 17 00:00:00 2001 From: Aloento <11802769+Aloento@users.noreply.github.com> Date: Sun, 5 Feb 2023 16:24:10 +0100 Subject: [PATCH 1/2] Update build.yml --- .github/workflows/build.yml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) 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/ From 489763410689396a785ad96c73ac6220e0fe3111 Mon Sep 17 00:00:00 2001 From: Aloento <11802769+Aloento@users.noreply.github.com> Date: Sun, 5 Feb 2023 16:25:44 +0100 Subject: [PATCH 2/2] Update build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a05b994..fcd6679 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,7 @@ jobs: - name: Cross Compile run: | + cd ./Golang 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