Skip to content

ci(release): per-package prepare-release workflow + changelog script - #337

Merged
YunchuWang merged 2 commits into
mainfrom
release-workflow-per-package
Jul 30, 2026
Merged

ci(release): per-package prepare-release workflow + changelog script#337
YunchuWang merged 2 commits into
mainfrom
release-workflow-per-package

Conversation

@YunchuWang

@YunchuWang YunchuWang commented Jul 29, 2026

Copy link
Copy Markdown
Member

Splits the substantive release-tooling change out of #335 so it can be reviewed and merged on its own.

What

  • Reworks .github/workflows/prepare-release.yaml into the per-package release model: a required package choice input (durabletask-js, durabletask-js-azuremanaged, azure-functions-durable), per-package tag prefixes (v, azuremanaged-v, durable-functions-v), and per-package changelog paths.
  • Updates scripts/update-changelog.js to accept the per-package changelog path as a 4th argument.

Why these two files ship together

The workflow invokes node scripts/update-changelog.js "$NEW_VERSION" "$RELEASE_DATE" "$CHANGELOG_FILE" "$CHANGELOG_PATH"; that 4th argument only exists in the updated script, which has no other caller. Splitting them apart would break the release workflow.

Provenance

Content is byte-identical to the CI-green #335 branch at 8501bc0 — a pure re-partition, no behavior change. npm run lint exits 0.


Part of the #335 split

#335 is being decomposed into four mutually independent PRs that can merge in any order:

Together these carry every one of #335's 10 files with no overlap. #335 stays open until the file→PR mapping posted there is confirmed; these PRs neither merge nor close it.

Split out of #335 as a standalone, independently reviewable change.

Reworks .github/workflows/prepare-release.yaml into the per-package release
model (a required `package` choice input, per-package tag prefixes and
changelog paths) and updates scripts/update-changelog.js to accept the
per-package changelog path as a 4th argument.

These two files must ship together: the workflow invokes
`node scripts/update-changelog.js "$NEW_VERSION" "$RELEASE_DATE" \
"$CHANGELOG_FILE" "$CHANGELOG_PATH"`, and that 4th argument only exists in
the updated script (the script has no other caller).

Content is byte-identical to the CI-green #335 branch at 8501bc0; this is a
pure re-partition with no behavior change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d86f5f69-4e1a-4c1d-b017-5e290c85cc05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repo’s release tooling to support per-package release preparation (rather than bumping/tagging multiple packages together), while extending the changelog update script to target a package-specific changelog file.

Changes:

  • Updates prepare-release GitHub Actions workflow to require a package input and thread per-package metadata (dir, npm name, tag prefix, changelog path) through versioning/tagging/changelog steps.
  • Scopes changelog generation to commits affecting the selected package directory and uses per-package tag namespaces.
  • Extends scripts/update-changelog.js to accept an optional 4th argument to update a specified changelog file in place.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/prepare-release.yaml Converts release preparation to a per-package model with package-scoped tags, changelog paths, and publish guidance.
scripts/update-changelog.js Adds support for updating a caller-specified changelog file (instead of always CHANGELOG.md).

Comment thread scripts/update-changelog.js
The azure-functions-durable CHANGELOG on main is a placeholder skeleton
("# Changelog" + "## TBD" + a "Details to be finalized" bullet), not the
"## Upcoming"/"## v*" structure update-changelog.js expects. Because #337 and
#339 are independently mergeable, this script must produce a clean changelog
even if #337 lands first against that skeleton. Previously the first run
prepended the new release sections and stranded the old skeleton at the
bottom, yielding a confusing mixed-format file.

Detect only that exact pristine skeleton (CRLF/LF tolerant) and swap in the
standard empty Upcoming scaffold before the existing Upcoming parsing runs, so
the placeholder bullet is never promoted into release notes and modern
"## Upcoming" changelogs (core and the #339 compat rewrite) are unaffected.

Addresses PR #337 review comment r3678561864.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d86f5f69-4e1a-4c1d-b017-5e290c85cc05
Copilot AI review requested due to automatic review settings July 30, 2026 00:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/prepare-release.yaml:269

  • The run summary’s publish command omits --access public for the two scoped packages (@microsoft/durabletask-js*). In this repo state there’s no publishConfig.access in those package.json files, so npm publish will default to restricted access (or fail), which is easy to miss when following the workflow summary. Since this PR is intended to be independently mergeable, it’d be safer for the workflow to add --access public when npm_name is scoped.
          # Derive the npm dist-tag from the version string. A prerelease (contains "-") must
          # publish under a non-default tag so it does NOT move the "latest" dist-tag.
          if [[ "$NEW_VERSION" == *-* ]]; then
            PUBLISH_CMD="npm publish --registry https://registry.npmjs.org/ --tag preview"
          else
            PUBLISH_CMD="npm publish --registry https://registry.npmjs.org/"
          fi

@YunchuWang
YunchuWang merged commit fc4a7f7 into main Jul 30, 2026
17 checks passed
@YunchuWang
YunchuWang deleted the release-workflow-per-package branch July 30, 2026 17:49
YunchuWang added a commit that referenced this pull request Jul 30, 2026
…revert changelogs per owner review

Per repo-owner review on PR #339, the compat and root changelogs must not carry
hand-authored narrative -- the release workflow/script generates their
commit/message/PR entries at release time. Revert both to the origin/main
baseline (root CHANGELOG.md and packages/azure-functions-durable/CHANGELOG.md
are now byte-identical to origin/main; the compat file returns to the legacy
`# Changelog` / `## TBD` skeleton that #337's updated script normalizes).

Compat README (packages/azure-functions-durable/README.md):
- Fix the entity-locking migration note. The classic `{ df, log }` context does
  not expose `entities`, so an orchestrator that needs locks must migrate to the
  core-native orchestrator/context shape first, then use
  `context.entities.lockEntities(...)` / `context.entities.isInCriticalSection()`.
  Link #317 (closed, not planned) as the decision record and drop the false
  "there is no tracking issue" claim.
- Remove the verbose GA/Preview cross-feed comparison sentence from Requirements,
  keeping the required bundle ranges and the <= 4.32.0 gRPC warning.
- Consolidate the preview/install guidance into `## Status`: the v4 provider is
  in preview under the `preview` npm dist-tag, install with
  `durable-functions@preview`, APIs may change before the GA `4.0.0` release.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d86f5f69-4e1a-4c1d-b017-5e290c85cc05
YunchuWang added a commit that referenced this pull request Jul 30, 2026
Follow-up on the rebase onto main (which now contains #337 + #339). Corrects
doc/release_process.md so it matches the merged per-package release automation
and the owner's #339 changelog decisions:

- dist-tags: replace the misleading per-stage beta/next table + override note
  with the actual rule -- every prerelease publishes under a single `preview`
  dist-tag; a stable GA omits `--tag` and moves `latest`; git tags
  (v.../azuremanaged-v.../durable-functions-v...) are separate from npm
  dist-tags. Applied to both the Versioning Scheme and Quick Reference sections.
- Prepare Release only prepares a branch/tag/changelog; its emitted
  `npm publish` command is a MANUAL FALLBACK. The sanctioned publish path is
  the ADO official build + ESRP release pipeline.
- add a one-time azuremanaged tag preflight (seed azuremanaged-v0.3.0 from
  v0.3.0) so per-package changelog generation starts at v0.3.0 instead of the
  repo root -- no azuremanaged-v* tag exists yet, so the first run would
  otherwise fall back to the initial commit and dump the entire history.
- Publishing Step 2: the official build (official-build.yml) triggers on and
  builds `main` -- it has no branch/tag selector and never builds the release
  branch; one main build packs all three .tgz into one drop; stage selection
  decides which package publishes.
- Publishing Step 3: source artifact is the selected `main` official build
  (release.yml pins its build resource to branch: main); make explicit that
  core + compat need two release waves because the compat Prepare Release
  guard queries public npm for the exact core pin.
- changelog wording: generated `### Changes` commit/PR entries, not
  hand-authored `### Breaking Changes`; preview/migration narrative lives in
  packages/azure-functions-durable/README.md; Quick Reference citation moved
  from the compat CHANGELOG to the README.
- keep B11 as an explicit hard blocker for publishing durable-functions@
  4.0.0-beta.1 via ESRP; do not claim ESRP supports npm dist-tags.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d86f5f69-4e1a-4c1d-b017-5e290c85cc05
YunchuWang added a commit that referenced this pull request Jul 30, 2026
…fix B11 contradiction)

The Versioning Scheme and Quick Reference sections asserted (unqualified) that
"every prerelease publishes under a single preview dist-tag", which contradicts
the B11 note that the sanctioned ESRP path's dist-tag behavior is unknown and
blocked. Only #337's emitted MANUAL FALLBACK `npm publish` command is known to
use `--tag preview`; ESRP is not.

- Versioning Scheme: scope the preview mapping to the Prepare Release workflow's
  emitted manual fallback command, and state that sanctioned prerelease
  publishing via ESRP is blocked pending B11.
- Quick Reference prerelease bullet: "Every prerelease publishes..." ->
  "When using this manual fallback, publish every prerelease..."; `latest`
  protection and the README install citation are preserved.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d86f5f69-4e1a-4c1d-b017-5e290c85cc05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants