Skip to content

Commit

Permalink
update action
Browse files Browse the repository at this point in the history
  • Loading branch information
meowrain committed Nov 18, 2024
1 parent 41b8841 commit 6f3dec9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -62,14 +64,14 @@ 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
env:
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

0 comments on commit 6f3dec9

Please sign in to comment.