Skip to content

ci: two-stage release with manual approval#814

Merged
fengmk2 merged 7 commits into
masterfrom
ci/two-stage-release
Jun 13, 2026
Merged

ci: two-stage release with manual approval#814
fengmk2 merged 7 commits into
masterfrom
ci/two-stage-release

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jun 13, 2026

Copy link
Copy Markdown
Member

Reworks the release into two workflows, modeled on vite-plus, with the final publish gated by manual approval.

  • prepare_release.yml: manual workflow_dispatch with a version input. Bumps package.json and opens a release/vX.Y.Z PR.
  • release.yml: triggers when the version lands on master. check confirms the version actually changed vs npm, request-approval pushes the approval prompt to DingTalk (signed webhook), then release publishes to npm and creates the GitHub Release.

Manual approval is enforced by the release environment gate. Setup needed before first use: create an Environment named release with required reviewers. Secrets DINGTALK_RELEASE_WEBHOOK_URL and DINGTALK_RELEASE_WEBHOOK_SECRET are already configured.

Release flow: run Prepare Release -> merge the PR -> approve the release environment -> publish.

Summary by CodeRabbit

  • Chores
    • Added a manual "Prepare Release" workflow to create release branches and pull requests from a provided semantic version.
    • Enforced version validation and automated package.json bump in the prepare flow.
    • Implemented a gated release pipeline: detects package.json version changes, sends an approval notification, requires environment approval, re-checks version before publish, derives npm dist-tag from the version, and creates a GitHub Release with explicit tag and name.

Split the release into a manually dispatched Prepare Release workflow that
bumps the version and opens a release PR, and a Release workflow that runs
when the bump lands on master. Release is gated by the `release` environment
(required reviewers) for manual approval, and pushes the approval prompt to
DingTalk via a signed webhook before the gate.
Copilot AI review requested due to automatic review settings June 13, 2026 12:31
@fengmk2 fengmk2 self-assigned this Jun 13, 2026
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a manual Prepare Release workflow that bumps package.json and opens a release PR, and revises the release pipeline to run on package.json changes, check/version-gate the run, send a signed DingTalk approval, require environment approval, re-check npm, compute dist-tags from VERSION, and create GitHub Release.

Changes

Release Automation with Manual Preparation and Approval Gating

Layer / File(s) Summary
Manual Release Preparation Workflow
.github/workflows/prepare_release.yml
Workflow dispatch with required version input, empty top-level permissions, concurrency per-workflow+ref; prepare job validates semver input, updates package.json version via sed, verifies the change, and creates a PR from release/v${{ inputs.version }} to master using peter-evans/create-pull-request.
Release Pipeline with Version Check and Approval Gate
.github/workflows/release.yml
Reworked to trigger on pushes to master when package.json changes; adds a check job that outputs VERSION and version_changed, a conditional request-approval job that posts a signed DingTalk notification, and a release job gated on version_changed == 'true' and environment: release approval; re-checks npm before publish, computes dist-tag from env.VERSION, publishes with that tag, and creates a GitHub Release v${{ env.VERSION }} targeting github.sha.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • node-modules/urllib#721: Modifies .github/workflows/release.yml and release/dist-tag/version validation logic similar to this change.

Poem

🐰 I nudged the version, opened a PR so neat,
A DingTalk ping to wake the human seat,
Approval waits beneath the release gate light,
Then npm and GitHub stamp the tag tonight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: two-stage release with manual approval' accurately summarizes the main change: reworking the release process from single-stage to two-stage with manual approval via GitHub Actions environments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/two-stage-release

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new

pkg-pr-new Bot commented Jun 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/node-modules/urllib@814

commit: ac67aaf

@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.65%. Comparing base (4153532) to head (ac67aaf).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #814   +/-   ##
=======================================
  Coverage   94.65%   94.65%           
=======================================
  Files          10       10           
  Lines         730      730           
  Branches      228      228           
=======================================
  Hits          691      691           
  Misses         36       36           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

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 reworks the project’s npm/GitHub Release process into a two-stage GitHub Actions flow: a manually-triggered “prepare” workflow that opens a version-bump PR, and an automated “release” workflow that runs on master version changes and gates publishing behind a protected release Environment.

Changes:

  • Replace tag-based releasing with a master + package.json-path triggered release workflow, including a version-change check against the published npm package.
  • Add a DingTalk notification step to request manual approval before publishing, and gate the publish job via the release environment.
  • Add a new Prepare Release workflow to bump package.json version and open a release/vX.Y.Z pull request.

Reviewed changes

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

File Description
.github/workflows/release.yml Split release into check → notify → environment-gated publish/release on master version changes.
.github/workflows/prepare_release.yml Add manual workflow to bump package.json and open a versioned release PR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/prepare_release.yml Outdated
@fengmk2

fengmk2 commented Jun 13, 2026

Copy link
Copy Markdown
Member Author

@cursor review

@fengmk2

fengmk2 commented Jun 13, 2026

Copy link
Copy Markdown
Member Author

@codex review

- release: mark DingTalk notify as continue-on-error so a webhook
  failure cannot block reaching the manual approval gate
- prepare_release: validate the version input is semver without a
  leading v before mutating package.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/prepare_release.yml:
- Around line 31-37: Validate and sanitize the incoming VERSION before mutating
package.json or using it for branch names: ensure the inputs.version matches a
safe pattern (e.g., a strict semver or at minimum disallow characters like /, &,
and quotes) and fail fast if it does not; replace the brittle sed-based
replacement in the "Bump version" step with a safe update using a JSON-aware
tool (e.g., jq) to set .version in package.json so you don't need to escape
VERSION for regex replacement; also sanitize or normalize VERSION when deriving
branch names (e.g., strip or replace unsafe characters) so the branch creation
step cannot be broken by malicious/invalid input.
- Line 41: The workflow currently references the mutable tag "uses:
peter-evans/create-pull-request@v8"; replace that tag with an immutable full
commit SHA for the peter-evans/create-pull-request action (e.g., "uses:
peter-evans/create-pull-request@<full-commit-sha>"). Find the canonical commit
SHA from the action repository (GitHub UI or git ls-remote), paste that SHA in
place of "`@v8`", and commit the change so the workflow uses a pinned, immutable
action version.

In @.github/workflows/release.yml:
- Line 26: Replace mutable action tags with immutable 40-character commit SHAs
for each uses: entry identified (EndBug/version-check@v3,
voidzero-dev/setup-vp@v1, softprops/action-gh-release@v3): locate the
corresponding GitHub repository for each action, find the commit SHA you want to
lock to (usually the SHA of the release/tag currently referenced), and update
the workflow uses value to the full commit SHA (e.g. owner/repo@<40-char-sha>)
for each of the three action references so the workflow no longer depends on
mutable tags.
- Around line 58-60: The curl POST that sends "$PAYLOAD" to "$URL" should
include connection and overall timeouts plus retries to avoid hangs: update the
curl invocation (the line invoking curl -fsS -X POST "$URL" -H 'Content-Type:
application/json' -d "$PAYLOAD" ) to add flags such as --connect-timeout 5
--max-time 15 --retry 3 --retry-delay 5 --retry-connrefused --fail (and keep
-sS/-f as desired) so transient network issues or stalls are retried and the job
times out rather than blocking downstream jobs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: be069e22-a22a-4aa0-8bb2-766641b1f1c0

📥 Commits

Reviewing files that changed from the base of the PR and between 4153532 and 0bbd10a.

📒 Files selected for processing (2)
  • .github/workflows/prepare_release.yml
  • .github/workflows/release.yml

Comment thread .github/workflows/prepare_release.yml Outdated
Comment thread .github/workflows/prepare_release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
- Pin third-party actions to commit SHAs: version-check, action-gh-release,
  create-pull-request (setup-vp stays @v1, consistent with other workflows)
- Add connect/max timeout and retries to the DingTalk webhook curl so a
  stalled request cannot hang the request-approval job
Copilot AI review requested due to automatic review settings June 13, 2026 12:45

Copilot AI left a comment

Copy link
Copy Markdown

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 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/release.yml:99

  • The dist-tag detection only treats prereleases with a letter-only identifier (e.g. -beta.0) as prereleases. Since prepare_release.yml allows prerelease identifiers starting with digits (e.g. 1.2.3-0.1), this workflow would incorrectly publish those prereleases under the latest dist-tag.
          if echo "$VERSION" | grep -qE '-([a-zA-Z]+)'; then
            # Extract pre-release identifier (e.g. "beta" from "4.10.0-beta.0")
            PRE_TAG=$(echo "$VERSION" | sed -E 's/.*-([a-zA-Z]+).*/\1/')
            echo "tag=$PRE_TAG" >> "$GITHUB_OUTPUT"
          else
            echo "tag=latest" >> "$GITHUB_OUTPUT"
          fi

Comment thread .github/workflows/prepare_release.yml

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bbd10ac0a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml Outdated
workflow_dispatch can be launched from any ref; pin the checkout to master
so the release branch and version bump always start from the PR base.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/release.yml (2)

93-99: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't let unsupported prerelease formats fall back to latest.

prepare_release.yml accepts prerelease suffixes matching [0-9A-Za-z.]+, but this parser only recognizes alphabetic identifiers. Versions such as 4.10.0-1 or 4.10.0-0.beta.1 would hit the else branch and publish under the latest dist-tag. Either reject unsupported prerelease shapes here or derive the tag from any -* suffix before defaulting to latest.

Suggested fix
       - name: Determine npm dist-tag
         id: dist-tag
         run: |
-          if echo "$VERSION" | grep -qE '-([a-zA-Z]+)'; then
-            # Extract pre-release identifier (e.g. "beta" from "4.10.0-beta.0")
-            PRE_TAG=$(echo "$VERSION" | sed -E 's/.*-([a-zA-Z]+).*/\1/')
+          if [[ "$VERSION" == *-* ]]; then
+            # Extract the first prerelease identifier (e.g. "beta" from "4.10.0-beta.0")
+            PRE_TAG=${VERSION#*-}
+            PRE_TAG=${PRE_TAG%%.*}
+            if [[ -z "$PRE_TAG" || "$PRE_TAG" =~ ^[0-9] ]]; then
+              echo "::error::Unsupported prerelease tag in $VERSION"
+              exit 1
+            fi
             echo "tag=$PRE_TAG" >> "$GITHUB_OUTPUT"
           else
             echo "tag=latest" >> "$GITHUB_OUTPUT"
           fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 93 - 99, The prerelease detection
only matches alphabetic identifiers; change the check to detect any hyphenated
prerelease suffix that matches [0-9A-Za-z.]+ and extract it into PRE_TAG from
VERSION (e.g. use a regex like -([0-9A-Za-z.]+)$ with sed -E
's/.*-([0-9A-Za-z.]+)$/\1/'), then echo "tag=$PRE_TAG" to GITHUB_OUTPUT; keep
the existing else branch to emit "tag=latest" for everything else. Ensure you
update the conditional that currently examines VERSION and the PRE_TAG
extraction so the variable PRE_TAG holds the full allowed prerelease token (and
not just alphabetic chars).

25-30: ⚠️ Potential issue | 🟠 Major

Fix npm version gating and dist-tag derivation in release workflow

  • .github/workflows/release.yml uses EndBug/version-check against https://unpkg.com/urllib@latest/package.json, which only reflects the current latest dist-tag; it won’t detect re-releases of a version already published under another dist-tag (so the publish job can still reach npm publish and fail with “version already exists”).
  • .github/workflows/release.yml derives the npm dist-tag with grep -qE '-([a-zA-Z]+)' and sed ... 's/.*-([a-zA-Z]+).*/\1/', but .github/workflows/prepare_release.yml allows prerelease suffixes matching (-[0-9A-Za-z.]+)?. Valid prereleases like x.y.z-123 would be treated as latest (and not marked prerelease), and identifiers like beta.1 would be truncated to just beta.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 25 - 30, Replace the
EndBug/version-check invocation that points at unpkg (the file-url using
https://unpkg.com/urllib@latest/package.json) with a registry-based lookup so
the check sees all published versions (e.g., query the npm registry metadata for
the package instead of the unpkg latest package.json), and adjust the
version-check inputs so it detects if the candidate version already exists under
any dist-tag; additionally replace the brittle dist-tag extraction that uses
grep -qE '-([a-zA-Z]+)' and sed 's/.*-([a-zA-Z]+).*/\1/' with a robust
prerelease extractor that matches the full prerelease identifier per
prepare_release.yml's allowed pattern ((-[0-9A-Za-z.]+)?), for example using a
shell regex like if [[ "$VERSION" =~ -([0-9A-Za-z.]+)$ ]]; then
TAG="${BASH_REMATCH[1]}"; else TAG=latest; fi so tags like 123, beta.1, or rc.2
are preserved intact and numeric-only prereleases aren’t misclassified as
latest.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/release.yml:
- Around line 93-99: The prerelease detection only matches alphabetic
identifiers; change the check to detect any hyphenated prerelease suffix that
matches [0-9A-Za-z.]+ and extract it into PRE_TAG from VERSION (e.g. use a regex
like -([0-9A-Za-z.]+)$ with sed -E 's/.*-([0-9A-Za-z.]+)$/\1/'), then echo
"tag=$PRE_TAG" to GITHUB_OUTPUT; keep the existing else branch to emit
"tag=latest" for everything else. Ensure you update the conditional that
currently examines VERSION and the PRE_TAG extraction so the variable PRE_TAG
holds the full allowed prerelease token (and not just alphabetic chars).
- Around line 25-30: Replace the EndBug/version-check invocation that points at
unpkg (the file-url using https://unpkg.com/urllib@latest/package.json) with a
registry-based lookup so the check sees all published versions (e.g., query the
npm registry metadata for the package instead of the unpkg latest package.json),
and adjust the version-check inputs so it detects if the candidate version
already exists under any dist-tag; additionally replace the brittle dist-tag
extraction that uses grep -qE '-([a-zA-Z]+)' and sed 's/.*-([a-zA-Z]+).*/\1/'
with a robust prerelease extractor that matches the full prerelease identifier
per prepare_release.yml's allowed pattern ((-[0-9A-Za-z.]+)?), for example using
a shell regex like if [[ "$VERSION" =~ -([0-9A-Za-z.]+)$ ]]; then
TAG="${BASH_REMATCH[1]}"; else TAG=latest; fi so tags like 123, beta.1, or rc.2
are preserved intact and numeric-only prereleases aren’t misclassified as
latest.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f94e7782-7100-4604-a5b5-c6ba976727ac

📥 Commits

Reviewing files that changed from the base of the PR and between 390ac32 and 87015a9.

📒 Files selected for processing (2)
  • .github/workflows/prepare_release.yml
  • .github/workflows/release.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/prepare_release.yml

- Check whether the exact version is already published on npm instead of
  comparing against urllib@latest, so a prerelease under its own dist-tag is
  not treated as perpetually newer than latest and re-released
- Add workflow concurrency (cancel-in-progress) to cancel an older run still
  pending approval when a newer version lands
- Re-check publication state immediately before npm publish as a guard against
  a stale run approved after a newer version was published
Copilot AI review requested due to automatic review settings June 13, 2026 12:53

Copilot AI left a comment

Copy link
Copy Markdown

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 2 comments.

Comment thread .github/workflows/prepare_release.yml Outdated
Comment thread .github/workflows/release.yml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 31-46: The npm view check using npm view "urllib@$VERSION" version
currently treats any non-zero exit as “not published”; change it to capture npm
view's stdout/stderr and exit code, and only treat the result as “missing” when
the output/stderr clearly indicates a 404/not-found for that exact version (e.g.
messages containing "404", "Not Found", "No matching version", or similar); for
any other non-zero exit (auth, network, registry errors) fail the job with exit
1 so the workflow doesn't continue. Apply this change to the existing npm view
invocations that use VERSION (the command npm view "urllib@$VERSION" version and
the step that sets VERSION) so they inspect the error output and branch on
not-found vs fatal errors accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1bedf3bf-3205-4cf3-a43b-a453d05cb49a

📥 Commits

Reviewing files that changed from the base of the PR and between 4d9aded and 5519557.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Comment thread .github/workflows/release.yml
fengmk2 added 2 commits June 13, 2026 21:02
…ling

- prepare_release: use POSIX [[:space:]] instead of \s in the sed so the
  version line matches reliably across sed implementations
- release: derive dist-tag from any pre-release identifier (including
  numeric, e.g. 1.2.3-0), stripping build metadata, so prereleases are
  never published to latest
- release: treat npm view non-zero exits as "not published" only on a
  genuine E404; fail the job on auth/network/registry errors instead of
  assuming the version is missing
- Capture npm view exit code with `STATUS=0; OUTPUT=$(...) || STATUS=$?`
  instead of toggling set +e/set -e, and grep the output via here-string
- Merge the prepare-release validate and bump steps into one, dropping the
  duplicated env and set -euo pipefail boilerplate

No behavior change.
Copilot AI review requested due to automatic review settings June 13, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown

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.

@fengmk2 fengmk2 merged commit 947356d into master Jun 13, 2026
20 checks passed
@fengmk2 fengmk2 deleted the ci/two-stage-release branch June 13, 2026 13:30
fengmk2 added a commit that referenced this pull request Jun 13, 2026
Brings the 4.x maintenance branch onto the same release flow as master
(#814), so every line releases the same way.

**Flow:** run **Prepare Release** (manual, with a version) -> it opens a
`release/vX.Y.Z` PR -> merge it -> **Release** checks the version
against npm, pushes an approval request to DingTalk, waits on the
`release` environment gate, then publishes and creates the GitHub
Release.

**4.x specifics:**
- Publishes under dist-tag `latest-4` (never `latest`).
- Builds via the Vite+ (`vp`) toolchain.
- Replaces the previous tag-based `release.yml`.
- npm auth via OIDC trusted publishing (`id-token: write`).

Requires the repo `release` environment (required reviewers) and npm
trusted-publisher config to allow this branch's workflow. DingTalk
secrets are already set repo-wide.
fengmk2 added a commit that referenced this pull request Jun 13, 2026
Brings the 3.x maintenance branch onto the same release flow as master
(#814), so every line releases the same way.

**Flow:** run **Prepare Release** (manual, with a version) -> it opens a
`release/vX.Y.Z` PR -> merge it -> **Release** checks the version
against npm, pushes an approval request to DingTalk, waits on the
`release` environment gate, then publishes and creates the GitHub
Release.

**3.x specifics:**
- Publishes under dist-tag `latest-3` (never `latest`).
- Builds via tshy (npm `prepublishOnly`) on Node 22.
- Replaces the previous shared `node-release` reusable workflow.
- npm auth via OIDC trusted publishing (`id-token: write`).

Requires the repo `release` environment (required reviewers) and npm
trusted-publisher config to allow this branch's workflow. DingTalk
secrets are already set repo-wide.
fengmk2 added a commit that referenced this pull request Jun 13, 2026
Brings the 2.x maintenance branch onto the same release flow as master
(#814), so every line releases the same way.

**Flow:** run **Prepare Release** (manual, with a version) -> it opens a
`release/vX.Y.Z` PR -> merge it -> **Release** checks the version
against npm, pushes an approval request to DingTalk, waits on the
`release` environment gate, then publishes and creates the GitHub
Release.

**2.x specifics:**
- Publishes under dist-tag `latest-2` (never `latest`).
- Publishes `lib/` directly (no build step).
- Replaces the previous shared `node-release` reusable workflow.
- npm auth via OIDC trusted publishing (`id-token: write`).

Requires the repo `release` environment (required reviewers) and npm
trusted-publisher config to allow this branch's workflow. DingTalk
secrets are already set repo-wide.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants