diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 7a5d9d0..85a9583 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -2,8 +2,8 @@ name: Build and Release Go App on: push: - tags: - - 'v*' # Runs only when a new version tag is pushed + # tags: + # - 'v*' # Runs only when a new version tag is pushed jobs: build: @@ -23,10 +23,17 @@ jobs: go-version: '1.21' - name: Set environment variables + if: runner.os != 'Windows' run: | echo "GOOS=${{ runner.os == 'Windows' && 'windows' || runner.os == 'macos' && 'darwin' || 'linux' }}" >> $GITHUB_ENV echo "GOARCH=${{ matrix.goarch }}" >> $GITHUB_ENV + - name: Set environment variables + if: runner.os == 'Windows' + run: | + Add-Content -Path $env:GITHUB_ENV "GOOS=${{ runner.os == 'Windows' && 'windows' || runner.os == 'macos' && 'darwin' || 'linux' }}" + Add-Content -Path $env:GITHUB_ENV "GOARCH=${{ matrix.goarch }}" + - name: Build application run: | mkdir -p dist