Add Windows build to the releases

This commit is contained in:
Greg Gauthier 2026-02-14 14:58:01 +00:00
parent 128f54d42e
commit 06edc07620

View File

@ -25,7 +25,8 @@ jobs:
fuse \
libfuse2 \
python3 \
python3-pip
python3-pip \
zip
- name: Install .NET SDK
run: |
@ -50,10 +51,10 @@ jobs:
echo '/workspace/gmgauthier/notepad/squashfs-root/AppRun "$@"' >> /usr/local/bin/appimagetool
chmod +x /usr/local/bin/appimagetool
- name: Build Linux Packages
- name: Build Packages
run: |
cd NotePad
python3 publish.py linux both
python3 publish.py both
- name: Create Release Archive
run: |
@ -66,16 +67,22 @@ jobs:
release/NotePad-${VERSION}-x86_64.AppImage
fi
# Copy Tarball
# Copy Linux Tarball
cp publish/tarball/notepad-0.1.0-linux-x64.tar.gz \
release/notepad-${VERSION}-linux-x64.tar.gz
# Create Windows zip
cd publish/win-x64
zip -r ../../release/notepad-${VERSION}-win-x64.zip .
cd ../..
# Generate checksums
cd release
if [ -f NotePad-${VERSION}-x86_64.AppImage ]; then
sha256sum NotePad-${VERSION}-x86_64.AppImage > NotePad-${VERSION}-x86_64.AppImage.sha256
fi
sha256sum notepad-${VERSION}-linux-x64.tar.gz > notepad-${VERSION}-linux-x64.tar.gz.sha256
sha256sum notepad-${VERSION}-win-x64.zip > notepad-${VERSION}-win-x64.zip.sha256
ls -lh # For debugging
- name: Create Release
@ -91,7 +98,7 @@ jobs:
-d "{
\"tag_name\": \"${VERSION}\",
\"name\": \"NotePad ${VERSION}\",
\"body\": \"Release ${VERSION}\n\n## Linux Downloads\n- **AppImage**: Portable, single-file executable (no installation needed)\n- **Tarball**: Extract and run \`sudo ./install.sh\` to install\"
\"body\": \"Release ${VERSION}\n\n## Downloads\n\n### Linux\n- **AppImage**: Portable, single-file executable (no installation needed)\n- **Tarball**: Extract and run \`sudo ./install.sh\` to install\n\n### Windows\n- **Zip**: Extract and run \`NotePad.exe\`\"
}" > release_response.json
RELEASE_ID=$(cat release_response.json | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)
@ -109,14 +116,24 @@ jobs:
--data-binary @release/NotePad-${VERSION}-x86_64.AppImage.sha256
fi
# Upload tarball
# Upload Linux tarball
curl -X POST "https://repos.gmgauthier.com/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=notepad-${VERSION}-linux-x64.tar.gz" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/gzip" \
--data-binary @release/notepad-${VERSION}-linux-x64.tar.gz
# Upload tarball checksum
curl -X POST "https://repos.gmgauthier.com/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=notepad-${VERSION}-linux-x64.tar.gz.sha256" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: text/plain" \
--data-binary @release/notepad-${VERSION}-linux-x64.tar.gz.sha256
# Upload Windows zip
curl -X POST "https://repos.gmgauthier.com/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=notepad-${VERSION}-win-x64.zip" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/zip" \
--data-binary @release/notepad-${VERSION}-win-x64.zip
curl -X POST "https://repos.gmgauthier.com/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=notepad-${VERSION}-win-x64.zip.sha256" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: text/plain" \
--data-binary @release/notepad-${VERSION}-win-x64.zip.sha256