ci: publish release packages to GitHub Releases

This commit is contained in:
tothbt committed 2026-11-02 17:30:32 +01:00
1 parent e7d9fe0efb
commit 2f7f5ba5af
2 files changed
+58 -1

No files matched your search

+50
View File
@@ -66,6 +66,15 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: npm run tauri build
- name: Upload Windows packages as GitHub artifact
uses: actions/upload-artifact@v4
with:
name: court-pilot-windows
if-no-files-found: error
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
- name: Upload release assets to CrabNebula
uses: crabnebula-dev/cloud-release@v0
with:
@@ -116,6 +125,13 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: npm run tauri build -- --target ${{ matrix.target }} --bundles app,dmg
- name: Upload macOS packages as GitHub artifact
uses: actions/upload-artifact@v4
with:
name: court-pilot-macos-${{ matrix.target }}
if-no-files-found: error
path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg
- name: Upload release assets to CrabNebula
uses: crabnebula-dev/cloud-release@v0
with:
@@ -228,3 +244,37 @@ jobs:
api-key: ${{ secrets.CN_API_KEY }}
path: ./src-tauri
working-directory: ./src-tauri
# ---------------------------------------------------------
# Publish GitHub release after CrabNebula publication succeeds
# ---------------------------------------------------------
github-release:
needs: publish
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Download release packages
uses: actions/download-artifact@v4
with:
pattern: court-pilot-*
path: release-assets
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RELEASE_TAG: ${{ github.ref_name }}
shell: bash
run: |
mapfile -d '' assets < <(find release-assets -type f -print0)
if [ "${#assets[@]}" -eq 0 ]; then
echo "No release packages found" >&2
exit 1
fi
gh release create "$RELEASE_TAG" "${assets[@]}" \
--verify-tag \
--title "$RELEASE_TAG" \
--generate-notes