mirror of
https://github.com/Molunerfinn/PicGo.git
synced 2026-10-20 00:15:41 +00:00
* ✨ 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.
33 lines
1004 B
YAML
33 lines
1004 B
YAML
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"
|