ci: publish Windows installer on version tags

This commit is contained in:
2026-09-04 11:04:21 +08:00
parent 691c8adff2
commit a4043fbc85

View File

@@ -46,3 +46,29 @@ jobs:
path: src-tauri/target/release/bundle/nsis/*.exe
if-no-files-found: error
retention-days: 7
release:
name: Publish GitHub Release
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Windows installer
uses: actions/download-artifact@v4
with:
name: OpsLog-Windows-x64-${{ github.ref_name }}
path: release
- name: Publish release assets
env:
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
sha256sum release/*.exe > release/SHA256SUMS
gh release create "${GITHUB_REF_NAME}" release/*.exe release/SHA256SUMS \
--repo "${GITHUB_REPOSITORY}" \
--title "OpsLog ${GITHUB_REF_NAME#v}" \
--generate-notes