feat(windows): rewrite NSIS installer, add pgtidy update command
This commit is contained in:
@@ -231,10 +231,10 @@ jobs:
|
||||
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build \
|
||||
-trimpath \
|
||||
-ldflags "-X main.version=${PKGVER}" \
|
||||
-o pgtidy.exe \
|
||||
-o pgtidy-windows-amd64.exe \
|
||||
./cmd/pgtidy
|
||||
|
||||
makensis -DVERSION="${PKGVER}" -DSRC_EXE="$(pwd)/pgtidy.exe" windows/installer.nsi
|
||||
makensis -DVERSION="${PKGVER}" -DEXE="$PWD/pgtidy-windows-amd64.exe" -DOUT="$PWD/pgtidy-setup-windows-amd64.exe" windows/installer.nsi
|
||||
|
||||
- name: Upload to release
|
||||
run: |
|
||||
@@ -244,7 +244,7 @@ jobs:
|
||||
-H "Authorization: token ${GITHUB_TOKEN}")
|
||||
UPLOAD_URL=$(echo "$RELEASE" | grep -o '"upload_url":"[^"]*"' | cut -d'"' -f4 | sed 's/{[^}]*}//')
|
||||
[ -z "$UPLOAD_URL" ] && { echo "upload_url not found: $RELEASE"; exit 1; }
|
||||
for f in windows/pgtidy-setup-*.exe; do
|
||||
for f in pgtidy-setup-windows-amd64.exe; do
|
||||
echo "Uploading $(basename "$f")..."
|
||||
curl -s -X POST "${UPLOAD_URL}?name=$(basename "$f")" \
|
||||
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||
|
||||
Reference in New Issue
Block a user