Files
wehub-resource-sync d18ada4ee7
Docker Publish / docker (web, apps/web/Dockerfile, web) (push) Failing after 0s
Docker Publish / docker (api, apps/api/Dockerfile, api) (push) Failing after 1s
Publish Extension / detect-version (push) Has been skipped
Publish Extension / submit (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:24:41 +08:00

74 lines
2.0 KiB
YAML

name: Build and Release Electron App
on:
push:
tags:
- v*.*.*
workflow_dispatch:
# Never run two releases for the same ref at once, and never cancel an in-progress
# release (cancelling mid-publish could leave a half-uploaded GitHub release).
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
uses: ./.github/workflows/build.yml
with:
upload_artifacts: true
secrets: inherit
release:
needs: [build]
runs-on: ubuntu-latest
# Only publish a GitHub release for tag pushes. A manual workflow_dispatch run
# has no tag, so it acts as a build-only smoke test (artifacts only, no release).
if: github.ref_type == 'tag'
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Detect release type
id: release_meta
shell: bash
run: |
if [[ "${GITHUB_REF_NAME}" == *-preview.* ]]; then
echo "is_preview=true" >> "$GITHUB_OUTPUT"
else
echo "is_preview=false" >> "$GITHUB_OUTPUT"
fi
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist/
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: ${{ steps.release_meta.outputs.is_preview == 'true' }}
files: |
dist/*.exe
dist/*.zip
dist/*.dmg
dist/*.AppImage
dist/*.snap
dist/*.deb
dist/*.rpm
dist/*.tar.gz
dist/*.yml
dist/*.blockmap
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Notify Cloudflare Pages
if: steps.release_meta.outputs.is_preview != 'true'
env:
CLOUDFLARE_WEBHOOK_URL: ${{ secrets.CLOUDFLARE_WEBHOOK_URL }}
run: |
curl -X POST "$CLOUDFLARE_WEBHOOK_URL"