Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
mirzakhany committed Oct 10, 2024
1 parent dc36a72 commit 1ffdb79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
run: |
gh release upload ${{ github.event.release.tag_name }} ./dist/chapar-windows-${{ github.ref_name }}-amd64.zip
gh release upload ${{ github.event.release.tag_name }} ./dist/chapar-windows-${{ github.ref_name }}-i386.zip
gh release upload ${{ github.event.release.tag_name }} ./dist/chapar-windows-${{ github.ref_name }}-arm64.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ build_macos_dmg: build_macos_app
build_windows:
@echo "Building Windows..."
cp build\appicon.png .
gogio -ldflags="-X main.serviceVersion=$(TAG_NAME)" -target=windows -arch=amd64 -o dist\amd64\Chapar.exe .
gogio -ldflags="-X main.serviceVersion=$(TAG_NAME)" -target=windows -arch=386 -o dist\i386\Chapar.exe .
gogio -ldflags="-X main.serviceVersion=${TAG_NAME}" -target=windows -arch=amd64 -o "dist\amd64\Chapar.exe" .
gogio -ldflags="-X main.serviceVersion=${TAG_NAME}" -target=windows -arch=386 -o "dist\i386\Chapar.exe" .
gogio -ldflags="-X main.serviceVersion=${TAG_NAME}" -target=windows -arch=arm64 -o "dist\arm64\Chapar.exe" .
rm *.syso
powershell -Command "Compress-Archive -Path dist\amd64\Chapar.exe -Destination dist\chapar-windows-$(TAG_NAME)-amd64.zip"
powershell -Command "Compress-Archive -Path dist\i386\Chapar.exe -Destination dist\chapar-windows-$(TAG_NAME)-i386.zip"
powershell -Command "Compress-Archive -Path dist\amd64\Chapar.exe -Destination dist\chapar-windows-${TAG_NAME}-amd64.zip"
powershell -Command "Compress-Archive -Path dist\i386\Chapar.exe -Destination dist\chapar-windows-${TAG_NAME}-i386.zip"
powershell -Command "Compress-Archive -Path dist\arm64\Chapar.exe -Destination dist\chapar-windows-${TAG_NAME}-arm64.zip"
rm -rf .\dist\amd64
rm -rf .\dist\i386
rm -rf .\dist\arm64

.PHONY: build_linux
build_linux:
Expand Down

0 comments on commit 1ffdb79

Please sign in to comment.