Skip to content

refactor(ci): split release workflow into separate specialized workflows#6193

Merged
jdx merged 2 commits intomainfrom
refactor-release-workflows
Sep 5, 2025
Merged

refactor(ci): split release workflow into separate specialized workflows#6193
jdx merged 2 commits intomainfrom
refactor-release-workflows

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Sep 5, 2025

Summary

  • Refactored the release workflow to split npm publishing, Cloudflare deployments, and redirect updates into separate workflows
  • Following the same pattern as copr-publish and release-alpine workflows
  • Each workflow can now be triggered independently and debugged in isolation

Changes

New Workflows

  1. npm-publish.yml - Handles npm package publishing

    • Downloads release artifacts from GitHub release
    • Runs the npm publish script with proper environment setup
  2. cloudflare-deploy.yml - Handles Cloudflare Worker and redirect updates

    • Deploys the mise.run worker
    • Updates redirects for the latest version

Modified Workflows

  • release.yml
    • Removed npm publishing step
    • Removed Cloudflare Worker deployment step
    • Removed redirect update step
    • Removed unnecessary Node.js setup

Benefits

  • Better separation of concerns - Each workflow has a single responsibility
  • Independent triggers - Workflows can be manually triggered via workflow_dispatch
  • Failure isolation - Issues in one workflow don't block others
  • Easier debugging - Smaller, focused workflows are easier to troubleshoot
  • Consistent pattern - Follows the same structure as other post-release workflows

Test plan

  • The main release workflow continues to work and publishes GitHub releases
  • npm packages are published automatically when a release is created
  • Cloudflare Worker and redirects are updated when a release is created
  • Manual workflow_dispatch triggers work for testing (with dry-run option)
  • Proper concurrency controls prevent overlapping runs

🤖 Generated with Claude Code

Move npm publishing, Cloudflare Worker deployment, and redirect updates
from the main release workflow into their own dedicated workflows,
following the same pattern as copr-publish and release-alpine.

This provides several benefits:
- Each workflow can be triggered and debugged independently
- Failures in one workflow don't block the others
- Better separation of concerns and easier maintenance
- Consistent pattern across all post-release workflows
- Support for both automatic (on release) and manual (workflow_dispatch) triggers

Changes:
- Created npm-publish.yml workflow for npm package publishing
- Created cloudflare-deploy.yml workflow for Cloudflare Worker and redirect updates
- Removed these steps from the main release.yml workflow
- Removed unnecessary Node.js setup from release workflow

All new workflows:
- Trigger automatically when a release is published
- Support manual triggering via workflow_dispatch with dry-run option
- Have proper concurrency controls to prevent overlapping runs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 5, 2025 15:11
Copy link
Contributor

Copilot AI left a comment

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 refactors the monolithic release workflow by extracting npm publishing and Cloudflare deployment functionality into separate, specialized workflows for better maintainability and failure isolation.

  • Split the release workflow into three focused workflows: main release, npm publishing, and Cloudflare deployments
  • Each new workflow can be triggered independently via workflow_dispatch with dry-run support
  • Follows the same pattern established by existing specialized workflows like copr-publish and release-alpine

Reviewed Changes

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

File Description
.github/workflows/release.yml Removed npm publishing, Cloudflare deployment, and Node.js setup steps to focus solely on GitHub release creation
.github/workflows/npm-publish.yml New workflow handling npm package publishing with artifact download from GitHub releases
.github/workflows/cloudflare-deploy.yml New workflow managing Cloudflare Worker deployment and redirect updates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- name: Setup Node.js
uses: actions/setup-node@11056ad2a9a61d2ddfc39e32a5d6ce4f21ba36f0 # v4
with:
node-version: '20'
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The Node.js version should be consistent with the project's requirements. The original workflow used '22.x' but this uses '20'. Consider using '22' for consistency.

Suggested change
node-version: '20'
node-version: '22'

Copilot uses AI. Check for mistakes.
group: npm-publish-${{ github.event_name == 'release' && github.event.release.tag_name || github.ref_name }}

env:
DRY_RUN: ${{ github.event_name == 'release' && '0' || (github.event_name == 'workflow_dispatch' && (github.event.inputs.dry_run && '1' || '0')) || '1' }}
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

[nitpick] The DRY_RUN environment variable logic is complex and hard to read. Consider simplifying this expression or breaking it into multiple steps for better maintainability.

Copilot uses AI. Check for mistakes.
group: cloudflare-deploy-${{ github.event_name == 'release' && github.event.release.tag_name || github.ref_name }}

env:
DRY_RUN: ${{ github.event_name == 'release' && '0' || (github.event_name == 'workflow_dispatch' && (github.event.inputs.dry_run && '1' || '0')) || '1' }}
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

[nitpick] The DRY_RUN environment variable logic is duplicated from npm-publish.yml and equally complex. Consider extracting this into a reusable composite action or simplifying the logic.

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +46
- name: Deploy Cloudflare Worker
run: mise x -- scripts/deploy-worker.sh
Copy link

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

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

The Cloudflare Worker deployment step doesn't check the DRY_RUN environment variable, unlike the npm publish workflow. Consider adding dry-run support for consistency.

Suggested change
- name: Deploy Cloudflare Worker
run: mise x -- scripts/deploy-worker.sh
run: |
if [ "${DRY_RUN}" = "1" ]; then
echo "DRY_RUN is set. Skipping Cloudflare Worker deployment."
else
mise x -- scripts/deploy-worker.sh
fi

Copilot uses AI. Check for mistakes.
cursor[bot]

This comment was marked as outdated.

@jdx jdx merged commit a38564d into main Sep 5, 2025
18 checks passed
@jdx jdx deleted the refactor-release-workflows branch September 5, 2025 15:21
@github-actions
Copy link

github-actions bot commented Sep 5, 2025

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.9.1 x -- echo 18.3 ± 0.2 17.9 20.6 1.00
mise x -- echo 18.4 ± 0.2 17.8 19.2 1.01 ± 0.02

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.9.1 env 17.8 ± 0.2 17.3 19.6 1.00
mise env 17.9 ± 0.4 17.5 22.3 1.00 ± 0.03

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.9.1 hook-env 17.6 ± 0.2 17.1 19.1 1.01 ± 0.02
mise hook-env 17.5 ± 0.3 17.1 20.6 1.00

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.9.1 ls 15.8 ± 0.2 15.3 16.9 1.00
mise ls 15.9 ± 0.2 15.5 16.6 1.01 ± 0.02

xtasks/test/perf

Command mise-2025.9.1 mise Variance
install (cached) 162ms ✅ 100ms +62%
ls (cached) 61ms 60ms +1%
bin-paths (cached) 65ms 65ms +0%
task-ls (cached) 463ms 476ms -2%

✅ Performance improvement: install cached is 62%

jdx pushed a commit that referenced this pull request Sep 5, 2025
### 🐛 Bug Fixes

- **(ci)** set required environment variables for npm publishing by
[@jdx](https://github.com/jdx) in
[#6189](#6189)
- **(release)** clean up extra newlines in release notes formatting by
[@jdx](https://github.com/jdx) in
[#6190](#6190)
- **(release)** add proper newline after New Contributors section in
cliff template by [@jdx](https://github.com/jdx) in
[#6194](#6194)
- **(release)** fix changelog formatting to remove extra blank lines by
[@jdx](https://github.com/jdx) in
[#6195](#6195)
- **(release)** restore proper newline after New Contributors section by
[@jdx](https://github.com/jdx) in
[#6196](#6196)

### 🚜 Refactor

- **(ci)** split release workflow into separate specialized workflows by
[@jdx](https://github.com/jdx) in
[#6193](#6193)

### Chore

- **(release)** require GitHub Actions environment for release-plz
script by [@jdx](https://github.com/jdx) in
[#6191](#6191)
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Sep 8, 2025
## [2025.9.5](https://github.com/jdx/mise/compare/v2025.9.4..v2025.9.5) - 2025-09-06

### 🚀 Features

- **(task)** add timeout support for task execution by @jdx in [#6216](jdx/mise#6216)
- **(task)** sub-tasks in run lists by @jdx in [#6212](jdx/mise#6212)

### Chore

- fix npm publish action by @jdx in [14f4b09](jdx/mise@14f4b09)
- fix cloudflare release action by @jdx in [00afa25](jdx/mise@00afa25)
- fix git-cliff for release notes by @jdx in [15a9aed](jdx/mise@15a9aed)

## [2025.9.4](https://github.com/jdx/mise/compare/v2025.9.3..v2025.9.4) - 2025-09-06

### Chore

- fix git-cliff on release by @jdx in [3c388f2](jdx/mise@3c388f2)

## [2025.9.3](https://github.com/jdx/mise/compare/v2025.9.2..v2025.9.3) - 2025-09-06

### 🚀 Features

- **(backend)** improve http error when platform url missing; list available platforms by @jdx in [#6200](jdx/mise#6200)
- **(cli)** support scoped packages for all backend types by @earlgray283 in [#6213](jdx/mise#6213)
- **(http)** add URL replacement feature for HTTP requests by @ThomasSteinbach in [#6207](jdx/mise#6207)

### 🐛 Bug Fixes

- **(backend)** preserve arch underscores in platform keys by @jdx in [#6202](jdx/mise#6202)
- **(task)** resolve hanging issue with multiple depends_post by @jdx in [#6206](jdx/mise#6206)
- couldn't download node binary in Alpine, even if it exists in the mirror url by @Hazer in [#5972](jdx/mise#5972)
- **breaking** use config_root for env._.path by @jdx in [#6204](jdx/mise#6204)
- bugfix for paths that include spaces by @karim-elkholy in [#6210](jdx/mise#6210)

### 📚 Documentation

- improve release notes generation by @jdx in [#6197](jdx/mise#6197)
- fix release changelog contributor reporting by @jdx in [#6201](jdx/mise#6201)

### Chore

- use fine-grained gh token by @jdx in [#6208](jdx/mise#6208)
- use settings.local.json for claude config by @jdx in [fd0fba9](jdx/mise@fd0fba9)

### New Contributors

- @ThomasSteinbach made their first contribution in [#6207](jdx/mise#6207)
- @earlgray283 made their first contribution in [#6213](jdx/mise#6213)
- @karim-elkholy made their first contribution in [#6210](jdx/mise#6210)
- @Hazer made their first contribution in [#5972](jdx/mise#5972)

## [2025.9.2](https://github.com/jdx/mise/compare/v2025.9.1..v2025.9.2) - 2025-09-05

### 🐛 Bug Fixes

- **(ci)** set required environment variables for npm publishing by @jdx in [#6189](jdx/mise#6189)
- **(release)** clean up extra newlines in release notes formatting by @jdx in [#6190](jdx/mise#6190)
- **(release)** add proper newline after New Contributors section in cliff template by @jdx in [#6194](jdx/mise#6194)
- **(release)** fix changelog formatting to remove extra blank lines by @jdx in [#6195](jdx/mise#6195)
- **(release)** restore proper newline after New Contributors section by @jdx in [#6196](jdx/mise#6196)

### 🚜 Refactor

- **(ci)** split release workflow into separate specialized workflows by @jdx in [#6193](jdx/mise#6193)

### Chore

- **(release)** require GitHub Actions environment for release-plz script by @jdx in [#6191](jdx/mise#6191)

## [2025.9.1](https://github.com/jdx/mise/compare/v2025.9.0..v2025.9.1) - 2025-09-05

### 🐛 Bug Fixes

- python nested venv path order by @elvismacak in [#6124](jdx/mise#6124)
- resolve immutable release workflow and VERSION file timing issues by @jdx in [#6187](jdx/mise#6187)

### New Contributors

- @elvismacak made their first contribution in [#6124](jdx/mise#6124)

## [2025.9.0](https://github.com/jdx/mise/compare/v2025.8.21..v2025.9.0) - 2025-09-05

### 🚀 Features

- allow set/unset backend aliases by @roele in [#6172](jdx/mise#6172)

### 🐛 Bug Fixes

- **(aqua)** respect order of asset_strs by @risu729 in [#6143](jdx/mise#6143)
- **(java)** treat freebsd as linux (assuming linux compatability) by @roele in [#6161](jdx/mise#6161)
- **(nushell/windows)** Fix $env.PATH getting converted to a string by @zackyancey in [#6157](jdx/mise#6157)
- **(sync)** create uv_versions_path dir if it doesn't exist by @risu729 in [#6142](jdx/mise#6142)
- **(ubi)** show relevent error messages for v-prefixed tags by @risu729 in [#6183](jdx/mise#6183)
- remove nodejs/golang alias migrate code by @risu729 in [#6141](jdx/mise#6141)
- mise activate not working on powershell v5 by @L0RD-ZER0 in [#6168](jdx/mise#6168)

### 📚 Documentation

- **(task)** remove word "additional" to avoid confusions by @risu729 in [#6159](jdx/mise#6159)

### Chore

- update Cargo.lock by @risu729 in [#6184](jdx/mise#6184)

### New Contributors

- @zackyancey made their first contribution in [#6157](jdx/mise#6157)
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