From 6f3dec927b25be359bacce54bb41118ed7d1992b Mon Sep 17 00:00:00 2001 From: meowrain Date: Mon, 18 Nov 2024 10:32:21 +0800 Subject: [PATCH] update action --- .github/workflows/release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e189d7..c361adc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,6 +50,8 @@ jobs: run: | echo "GOOS=$(echo ${{ matrix.platform }} | cut -d '/' -f1)" >> $GITHUB_OUTPUT echo "GOARCH=$(echo ${{ matrix.platform }} | cut -d '/' -f2)" >> $GITHUB_OUTPUT + FORMATTED_PLATFORM=$(echo "${{ matrix.platform }}" | sed 's/\//-/g') + echo "FORMATTED_PLATFORM=$FORMATTED_PLATFORM" >> $GITHUB_OUTPUT if [[ "${{ matrix.platform }}" == *"windows"* ]]; then echo "EXT=.exe" >> $GITHUB_OUTPUT else @@ -62,7 +64,7 @@ jobs: GOARCH: ${{ steps.platform.outputs.GOARCH }} run: | mkdir -p ./artifacts - go build -o "./artifacts/localsend_cli-${{ matrix.platform }}${{ steps.platform.outputs.EXT }}" ./cmd + go build -o "./artifacts/localsend_cli-${{ steps.platform.outputs.FORMATTED_PLATFORM }}${{ steps.platform.outputs.EXT }}" ./cmd - name: Upload Release Asset uses: actions/upload-release-asset@v1 @@ -70,6 +72,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ./artifacts/localsend_cli-${{ matrix.platform }}${{ steps.platform.outputs.EXT }} - asset_name: localsend_cli-${{ matrix.platform }}${{ steps.platform.outputs.EXT }} + asset_path: ./artifacts/localsend_cli-${{ steps.platform.outputs.FORMATTED_PLATFORM }}${{ steps.platform.outputs.EXT }} + asset_name: localsend_cli-${{ steps.platform.outputs.FORMATTED_PLATFORM }}${{ steps.platform.outputs.EXT }} asset_content_type: application/octet-stream