ci: trigger post-merge publish and deploy on push to main - #178
Open
jaysin586 wants to merge 1 commit into
Open
Conversation
- Switch npm-publish.yml and cloudflare-deploy.yml from pull_request[closed] to push on main: fork PRs never receive secrets, even on the merged close event, so post-merge publishes/deploys silently failed for external contributions (first hit: humanspeak/svelte-motion#466). check-if-merged now recovers the merged PR (labels, title, URL) from the commit via the GitHub API, and all downstream steps consume its outputs instead of the pull_request payload. - Bump action versions everywhere: checkout v6->v7, setup-node v6->v7, cache v5->v6, upload-artifact v4->v7, github-script v7->v9, setup-python v6->v7, ghaction-import-gpg v6->v7. - Harden the trunk analytics Vitest upload in npm-publish.yml with continue-on-error so a flaky telemetry upload can never block a release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of humanspeak/svelte-motion#468 for this repo.
Why
GitHub withholds secrets from
pull_requestevents triggered by fork PRs — including the mergedclosedevent. Our post-merge npm publish and Cloudflare deploy both keyed offpull_request[closed], so external contributions merged to main silently failed to publish/deploy (first hit: humanspeak/svelte-motion#466).What changed
Push-trigger migration
npm-publish.ymlandcloudflare-deploy.ymlnow run onpushtomain(plusworkflow_dispatch), keeping the existingpaths:filters. Push events always run in the base repo with secrets.check-if-mergedrecovers the merged PR from the commit vialistPullRequestsAssociatedWithCommitand exposeshas_skip_label/has_major/has_minor/pr_number/pr_title/pr_urlas job outputs. Every downstream step now consumes those outputs instead ofgithub.event.pull_request.*; PR-comment steps are guarded onpr_number != ''. Direct pushes to main without an associated merged PR stay unpublished, matching the old behavior.Action version bumps (all workflows +
.trunk/setup-ci/action.yaml)actions/checkoutv6→v7,actions/setup-nodev6→v7,actions/cachev5→v6,actions/upload-artifactv4→v7,actions/github-scriptv7→v9,actions/setup-pythonv6→v7,crazy-max/ghaction-import-gpgv6→v7.Trunk unit-test upload hardening
The Vitest results upload to trunk-io/analytics-uploader in
npm-publish.ymlis nowcontinue-on-error: true— telemetry only, so a flaky upload can never block a release (a "fetch failed" there blocked the svelte-motion v0.9.0 publish on 2026-08-12).vite.config.tsalready emitsjunit-vitest.xml, matching the workflow'sjunit-paths.🤖 Generated with Claude Code