✨ Feature: rebuild picgo.app when a release is published (#1444)

* ✨ Feature: rebuild picgo.app when a release is published

The download page on picgo.app reads the installer list from the GitHub API at
build time, so a new release does not appear there until the site rebuilds.

Fires on `release: published` rather than on the tag push, because releases are
created as drafts here -- at tag time `releases/latest` still points at the
previous version, so the rebuild would pick up stale installers.

Needs a HOMEPAGE_DISPATCH_TOKEN secret with workflow scope on the homepage
repository; the existing GH_TOKEN is not reused so the two can be revoked
independently.

* 📦 Chore: allow builds for the native dependencies

pnpm 11 gates build scripts behind an explicit allowlist, so a fresh install
stopped partway and asked for `pnpm approve-builds`, which breaks any
non-interactive run including the husky pre-commit hook.

Records the approvals that were already implied by onlyBuiltDependencies. The
spacing change in supportedArchitectures is pnpm rewriting the file.
This commit is contained in:
PiEgg
2026-09-01 20:01:23 +08:00
committed by GitHub
parent 07ec7068a5
commit d5543073ea
2 changed files with 42 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
name: Notify Homepage
# Releases are created as drafts, so a tag push is too early -- the download
# page reads releases/latest, which only reflects a release once it is
# published. Firing on `published` also covers the case where a draft sits for
# days before going live.
on:
release:
types: [published]
workflow_dispatch:
jobs:
rebuild-homepage:
name: Rebuild picgo.app
runs-on: ubuntu-latest
steps:
- name: Trigger homepage deploy
env:
GH_TOKEN: ${{ secrets.HOMEPAGE_DISPATCH_TOKEN }}
run: |
if [ -z "$GH_TOKEN" ]; then
echo "::error::HOMEPAGE_DISPATCH_TOKEN is not set"
exit 1
fi
# The homepage builds its download list from the GitHub API at build
# time, so it needs a rebuild to pick up a new release.
gh workflow run deploy.yml \
--repo PicGo/PicGo-Homepage \
--ref production
echo "Requested a production rebuild of picgo.app"
+10 -2
View File
@@ -1,3 +1,11 @@
allowBuilds:
core-js: true
electron: true
electron-winstaller: true
esbuild: true
msw: true
vue-demi: true
onlyBuiltDependencies:
- core-js
- ejs
@@ -8,5 +16,5 @@ onlyBuiltDependencies:
- vue-demi
supportedArchitectures:
cpu: [x64, arm64]
os: [current]
cpu: [ x64, arm64 ]
os: [ current ]