You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Release-workflow fixes, aligning this repo with `facebook-for-woocommerce` and fixing bugs surfaced while cutting 5.2.2.
1. **Changelog generation** (`prepare-release.yml`) — fbshipit closes PRs (`mergedAt=null` + `Merged` label), which the old builder skipped → empty changelogs. Now detects landed PRs via `Merged` label / `merged_at`, `closed_at` date fallback, tag-commit-timestamp cutoff; keeps every `changelog:*` except `none`; skips `Release X.Y.Z` PRs.
2. **Auto-build on prepare** — `build-and-upload.yml` gains `workflow_call` (with `ref`); `prepare-release.yml` calls it inline **and** dispatches a standalone run (for `set-stable-tag` to find). Adds `actions: write` + `version` output.
3. **Woo safeguards** — previous-release-PR guard, `include-hidden-files: true`, per-PR builds.
4. **`set-stable-tag.yml` artifact lookup** — matched runs by `displayTitle` (never contains the branch ref) → "No build found". Now matches by `--branch` + `headSha` with polling. (Previously fixed only on `release/p5.2.1/publish`, never reached `main`.)
5. **Stray `build/` dir in the package** (`build.xml`) — the sourcedir fileset copied `.` into `./build/official-facebook-pixel/` without excluding `build/`, shipping a nested empty `build/`. Invisible because empty dirs are dropped by `upload-artifact` but committed by `svn add`. Excluded `build` + `build/**`.
6. **`pull-requests: read`** on the changelog step (else `gh pr list` 403s under the explicit permissions block) + **fail on empty changelog** (both incorporated from #170, which this supersedes).
7. **Release-notes extraction + spacing** — the `release-plugin.yml` "Extract release notes" loop broke at the current version's own header before collecting bullets, so the GitHub Release body (and the release PR body, copied from it) was always empty; fixed to collect the first block's bullets. Also normalized generated changelog/readme to a single blank line between release blocks.
Supersedes #170.
Pull Request resolved: #175
Reviewed By: rafael-curran
Differential Revision: D113760571
Pulled By: vahidkay-meta
fbshipit-source-id: b1d6c6bd089d2bf8312a5a10e971562e32c0b58e
if (labels.length === 0 || labels[0].toLowerCase() === 'none') continue;
169
+
# Fail loudly rather than cutting a release with an empty changelog
170
+
# (e.g. if PR labels are missing or the landed-PR detection regresses).
171
+
if [ -z "$CHANGELOG" ]; then
172
+
echo "::error::No changelog entries were generated for $NEW_VERSION. Ensure landed PRs since the last release carry a changelog:* label (other than none)."
173
+
exit 1
174
+
fi
137
175
138
-
const category = labels[0];
139
-
changelog.push(`* ${category.charAt(0).toUpperCase()}${category.slice(1)} - ${pr.title} by @${pr.user.login} in #${pr.number}`);
0 commit comments