Skip to content

Commit 63dc961

Browse files
committed
fix missing .exe for windows in release
1 parent 494046b commit 63dc961

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,20 @@ jobs:
3030
- name: Build Executable
3131
run: |
3232
mkdir -p build
33-
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/tfenv-${{ matrix.goos }}-${{ matrix.goarch }}
33+
EXT=""
34+
if [ "${{ matrix.goos }}" == "windows" ]; then EXT=".exe"; fi
35+
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/tfenv-${{ matrix.goos }}-${{ matrix.goarch }}$EXT
3436
3537
- name: Upload Build Artifact
3638
uses: actions/upload-artifact@v4
3739
with:
3840
name: tfenv-${{ matrix.goos }}-${{ matrix.goarch }}
39-
path: build/tfenv-${{ matrix.goos }}-${{ matrix.goarch }}
40-
41+
path: build/tfenv-${{ matrix.goos }}-${{ matrix.goarch }}*
42+
4143
release:
4244
name: Create GitHub Release
4345
runs-on: ubuntu-latest
44-
needs: build # Waits for the build job to complete
46+
needs: build # Wait for build job
4547

4648
steps:
4749
- name: Checkout Code

0 commit comments

Comments
 (0)