Skip to content

Commit d564446

Browse files
committed
Use npx release-it in release task
1 parent 4405ebb commit d564446

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

docs/releasing.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This guide is for Shakapacker maintainers who need to publish a new release.
99
```bash
1010
bundle install
1111
gem install gem-release # Provides `gem bump` and `gem release`
12-
yarn global add release-it # Installs release-it for npm publishing
12+
npm --version # Required because release task uses `npx release-it`
1313
gh --version # Required for automatic GitHub release creation
1414
```
1515

@@ -25,6 +25,9 @@ This guide is for Shakapacker maintainers who need to publish a new release.
2525
- Run `gh auth login` and ensure your account/token has write access to this repository
2626
- Required for automatic GitHub release creation after publishing
2727

28+
5. **No global `release-it` install required:**
29+
- The release task runs `npx --yes release-it ...` automatically
30+
2831
## Release Process
2932

3033
### 1. Update the Changelog
@@ -260,7 +263,7 @@ If you need to release manually (not recommended):
260263
2. **Publish to npm:**
261264

262265
```bash
263-
release-it 9.1.0 --npm.publish
266+
npx --yes release-it 9.1.0 --npm.publish
264267
```
265268

266269
3. **Publish to RubyGems:**

rakelib/release.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,9 @@ def perform_release(
520520
abort "❌ Expected gem bump to produce #{resolved_target_gem_version}, but found #{resolved_gem_version}."
521521
end
522522

523-
release_it_command = +"release-it #{Shellwords.escape(npm_version)}"
523+
# Use npx so maintainers don't need a globally installed `release-it` binary.
524+
# This avoids failures from shim managers (e.g. mise) when `release-it` isn't configured.
525+
release_it_command = +"npx --yes release-it #{Shellwords.escape(npm_version)}"
524526
release_it_command << " --npm.publish --no-git.requireCleanWorkingDir"
525527
release_it_command << " --dry-run --verbose" if dry_run
526528
npm_dist_tag = npm_dist_tag_for_version(npm_version)

0 commit comments

Comments
 (0)