From 85ca1eb2c7126e36c12f9411f2b8ccf444246cc0 Mon Sep 17 00:00:00 2001 From: Darren Kelly Date: Wed, 12 Jun 2024 16:05:55 +0100 Subject: [PATCH] fix: windows error --- .github/workflows/on-release.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/on-release.yaml b/.github/workflows/on-release.yaml index b8c37d1..c2eb99b 100644 --- a/.github/workflows/on-release.yaml +++ b/.github/workflows/on-release.yaml @@ -41,19 +41,12 @@ jobs: with: go-version: 1.22.x - - name: Setup Executable Name - # Examples: - # - 'network-hub-linux-amd64' - # - 'network-hub-windows-amd64.exe' - # - 'network-hub-macos-arm64' - run: echo "EXECUTABLE_NAME=network-hub-${{ matrix.goos == 'darwin' && 'macos' || matrix.goos }}-${{ matrix.goarch }}${{ runner.os == 'Windows' && '.exe' || '' }}" >> $GITHUB_ENV - - name: Build binary env: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} run: | - go build -v -o ${{ env.EXECUTABLE_NAME }} ./cmd/main.go + go build -v -o network-hub-${{ matrix.goos == 'darwin' && 'macos' || matrix.goos }}-${{ matrix.goarch }}${{ runner.os == 'Windows' && '.exe' || '' }} ./cmd/main.go - name: Upload Executable uses: xresloader/upload-to-github-release@v1.6.0 @@ -61,5 +54,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ inputs.tag || github.ref_name }} - file: ${{ env.EXECUTABLE_NAME }} + file: network-hub-${{ matrix.goos == 'darwin' && 'macos' || matrix.goos }}-${{ matrix.goarch }}${{ runner.os == 'Windows' && '.exe' || '' }} overwrite: true