From efbe12bcc4e78ff57c76ac3afda402b1a8e31d8c Mon Sep 17 00:00:00 2001 From: Devang Solanki <75718583+Devang-Solanki@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:36:20 +0530 Subject: [PATCH] Update go.yml --- .github/workflows/go.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0fa9c0e..464397b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,12 +6,12 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] # OS for building - arch: [amd64, arm64] # Architectures for building + os: [ubuntu-latest, macos-latest] + arch: [amd64, arm64] steps: - name: Checkout code @@ -20,24 +20,24 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.21.1' # Specify your Go version here + go-version: '1.23' # Correct Go version format - name: Build binaries run: | if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then if [[ "${{ matrix.arch }}" == "amd64" ]]; then - GOOS=linux GOARCH=amd64 go build . + GOOS=linux GOARCH=amd64 go build -o myapp . zip varunastra_linux_amd64.zip myapp elif [[ "${{ matrix.arch }}" == "arm64" ]]; then - GOOS=linux GOARCH=arm64 go build . + GOOS=linux GOARCH=arm64 go build -o myapp . zip varunastra_linux_arm64.zip myapp fi elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then if [[ "${{ matrix.arch }}" == "amd64" ]]; then - GOOS=darwin GOARCH=amd64 go build . + GOOS=darwin GOARCH=amd64 go build -o myapp . zip varunastra_darwin_amd64.zip myapp elif [[ "${{ matrix.arch }}" == "arm64" ]]; then - GOOS=darwin GOARCH=arm64 go build . + GOOS=darwin GOARCH=arm64 go build -o myapp . zip varunastra_darwin_arm64.zip myapp fi fi @@ -45,9 +45,9 @@ jobs: - name: Upload binaries to release uses: softprops/action-gh-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag: ${{ github.event.release.tag_name }} # Use the release tag for the upload + tag: ${{ github.event.release.tag_name }} files: | varunastra_linux_amd64.zip varunastra_linux_arm64.zip