fix: publish release notes tagged to version.rb instead of release-drafter's own version#32
Conversation
…after's own version changelog.yml now only keeps a draft release updated on every push to main, while gem-push.yml publishes that draft using the tag derived from lib/slidict/version.rb so the GitHub release and the published gem always share the same version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthrough
ChangesCI ワークフロー再編
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Trigger gem-push.yml via workflow_run on the Changelog workflow instead of push, so the gem/release publish step always runs after the draft release notes have been updated, avoiding a race between the two workflows. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
.github/workflows/gem-push.yml (1)
20-23: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick wincheckout の認証情報永続化を無効化してください。
この job は gemspec 実行と外部 publish 用 secrets を扱うため、不要な checkout token を
.git/configに残さない方が安全です。修正案
- uses: actions/checkout@v3 with: ref: ${{ github.event.workflow_run.head_sha }} fetch-depth: 0 + persist-credentials: false🤖 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/gem-push.yml around lines 20 - 23, The checkout step in the gem-push workflow is persisting credentials unnecessarily; update the actions/checkout usage in the job to disable credential persistence so no checkout token is left in .git/config. Keep the existing ref and fetch-depth behavior, and adjust the checkout configuration in the workflow so the gemspec/publish job only uses the repository content without storing auth details.Source: Linters/SAST tools
🤖 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/changelog.yml:
- Around line 17-21: The Update draft release notes step is still pinned to
release-drafter/release-drafter@v5, which should be upgraded to v6 for Node 16
compatibility. Update the action reference in the changelog workflow to use the
v6 release-drafter version, keeping the existing config-name and publish
settings unchanged.
In @.github/workflows/gem-push.yml:
- Around line 25-32: The version change check in the workflow only inspects
HEAD~1..HEAD, so it can miss lib/slidict/version.rb updates from earlier commits
in the same push. Update the logic in the version_file step to evaluate the full
push range or otherwise determine the bumped version by comparing the relevant
tag/release state, and keep the changed output accurate for gem publish and
release publish.
- Line 20: The workflow step using actions/checkout is pinned to v3 and should
be updated to v4 or newer. In gem-push.yml, change the checkout action version
in the checkout step so the workflow uses the supported release, keeping the
rest of the job logic unchanged.
- Around line 72-81: The Release Drafter action in the “Publish release notes”
step is still pinned to release-drafter/release-drafter@v5; update that action
reference to `@v6` in the workflow so it uses the Node.js 20-based release,
keeping the existing config-name, publish, tag, name, and GITHUB_TOKEN settings
unchanged.
---
Nitpick comments:
In @.github/workflows/gem-push.yml:
- Around line 20-23: The checkout step in the gem-push workflow is persisting
credentials unnecessarily; update the actions/checkout usage in the job to
disable credential persistence so no checkout token is left in .git/config. Keep
the existing ref and fetch-depth behavior, and adjust the checkout configuration
in the workflow so the gemspec/publish job only uses the repository content
without storing auth details.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 293a89e4-88e8-44dd-b008-061ce812bc70
📒 Files selected for processing (2)
.github/workflows/changelog.yml.github/workflows/gem-push.yml
| - name: Update draft release notes | ||
| uses: release-drafter/release-drafter@v5 | ||
| with: | ||
| config-name: release-drafter.yml | ||
| publish: ${{ steps.version_file.outputs.changed == 'true' }} | ||
| publish: false |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== workflow file ==\n'
if [ -f .github/workflows/changelog.yml ]; then
nl -ba .github/workflows/changelog.yml | sed -n '1,120p'
else
echo "missing .github/workflows/changelog.yml"
fi
printf '\n== release-drafter references ==\n'
rg -n "release-drafter|actionlint|workflow_run" .github . --glob '!**/node_modules/**' || trueRepository: slidict/slidict-cli
Length of output: 218
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== workflow file (with line numbers) ==\n'
awk 'NR>=1 && NR<=160 { printf "%4d %s\n", NR, $0 }' .github/workflows/changelog.yml
printf '\n== release-drafter references ==\n'
rg -n "release-drafter|actionlint|workflow_run" .github . --glob '!**/node_modules/**' || trueRepository: slidict/slidict-cli
Length of output: 1381
🌐 Web query:
release-drafter/release-drafter v5 v6 runner requirements actionlint
💡 Result:
The release-drafter GitHub Action transitioned from using Node 16 (in v5) to Node 20 (in v6) as the runner environment [1]. No specific runner OS requirements beyond the standard GitHub-hosted environments (e.g., ubuntu-latest) are mandated; the action is designed to be self-contained and does not require a prior checkout step, as it interacts directly with the GitHub API using octokit [2][3]. Regarding actionlint: While release-drafter does not have specific, documented requirements for actionlint, it follows standard GitHub Actions schema requirements [4]. Users typically include standard steps like checkout and configuration, and the action supports various inputs such as config-name, prerelease, and prerelease-identifier [2][5]. For migration from v5 to v6, the primary change is the underlying runtime, which is handled automatically by GitHub Actions when updating the reference (e.g., uses: release-drafter/release-drafter@v6) [1][6]. Ensure that any workflows utilizing older versions are updated to reference v6 [1][7]. There are no reports of breaking configuration changes that require manual intervention in the YAML structure for standard setups, though users should ensure their configuration files remain correctly located within the.github directory [8][2]. If using advanced features like prerelease management, be aware that v6 includes updated logic for handling prerelease identifiers and inclusion of pre-releases [1][9].
Citations:
- 1: release-drafter/release-drafter@v5...v6
- 2: https://github.com/release-drafter/release-drafter
- 3: https://github.com/release-drafter/release-drafter?tab=readme-ov-file
- 4: release-drafter/release-drafter@v6.0.0...v6.1.0
- 5: https://github.com/release-drafter/release-drafter/blob/master/action.yml
- 6: chore(deps): update release-drafter/release-drafter action to v6 MonolithProjects/ansible-github_actions_runner#193
- 7: emmanuelnk/github-actions-workflow-ts@297b88f
- 8: The release-drafter version 6 appears to function differently compared to the version 5 with multiple config-name's release-drafter/release-drafter#1435
- 9: https://github.com/release-drafter/release-drafter/releases/tag/v6.4.0
🌐 Web query:
release-drafter v5 node16 github actions deprecation still works v6 node20 official
💡 Result:
Release Drafter version 6 (v6) is the official version configured to run on Node 20 (and later Node 24) [1][2][3]. While older versions of Release Drafter, such as v5, used Node 16, GitHub Actions has deprecated Node 16, meaning workflows relying on v5 may encounter warnings or failures depending on the environment and runner configuration [4][5][3]. To ensure continued, stable functionality, you should update your GitHub Actions workflow to use the latest release-drafter version [5][6]. You can do this by updating the uses directive in your workflow YAML file: - uses: release-drafter/release-drafter@v6 Note that the project has since progressed beyond v6, transitioning to Node 24 for its runtime [1][2]. Using the latest version (e.g., @latest or the most recent stable tag) is recommended to maintain compatibility with current GitHub Actions runner requirements [2][6]. If you are using self-hosted runners, ensure your runner software is kept up to date to support the newer Node runtimes required by the action [4][5].
Citations:
- 1: https://github.com/release-drafter/release-drafter/blob/master/action.yml
- 2: feat: new major version release-drafter/release-drafter#1475
- 3: release-drafter/release-drafter@v5...v6
- 4: Parameter ''using: node16' is not supported, use 'docker' or 'node12' instead. release-drafter/release-drafter#1128
- 5: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
- 6: https://github.com/release-drafter/release-drafter?tab=readme-ov-file
release-drafter を v6 に更新してください。
release-drafter/release-drafter@v5 は Node 16 ベースで、GitHub Actions では Node 16 が非推奨です。v6 へ上げて互換性リスクを避けたいです。
修正案
- uses: release-drafter/release-drafter@v5
+ uses: release-drafter/release-drafter@v6📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Update draft release notes | |
| uses: release-drafter/release-drafter@v5 | |
| with: | |
| config-name: release-drafter.yml | |
| publish: ${{ steps.version_file.outputs.changed == 'true' }} | |
| publish: false | |
| - name: Update draft release notes | |
| uses: release-drafter/release-drafter@v6 | |
| with: | |
| config-name: release-drafter.yml | |
| publish: false |
🧰 Tools
🪛 actionlint (1.7.12)
[error] 18-18: the runner of "release-drafter/release-drafter@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 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/changelog.yml around lines 17 - 21, The Update draft
release notes step is still pinned to release-drafter/release-drafter@v5, which
should be upgraded to v6 for Node 16 compatibility. Update the action reference
in the changelog workflow to use the v6 release-drafter version, keeping the
existing config-name and publish settings unchanged.
Source: Linters/SAST tools
| packages: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
git ls-files .github/workflowsRepository: slidict/slidict-cli
Length of output: 282
🏁 Script executed:
sed -n '1,120p' .github/workflows/gem-push.yml && printf '\n---\n' && sed -n '1,160p' .github/workflows/test.yml && printf '\n---\n' && sed -n '1,160p' .github/workflows/bump-version.yml && printf '\n---\n' && sed -n '1,160p' .github/workflows/changelog.ymlRepository: slidict/slidict-cli
Length of output: 7080
🌐 Web query:
actions/checkout v3 Node16 deprecation GitHub Actions runner support 2025
💡 Result:
Node.js 16 reached end-of-life in GitHub Actions runners on November 12, 2024 [1]. As part of this transition, GitHub enforced the migration of all JavaScript-based actions to Node.js 20 [1][2]. Regarding actions/checkout specifically: 1. Version 3 of actions/checkout relies on Node.js 16 [3][4]. Because Node.js 16 is no longer supported in the runner environment, workflows using actions/checkout@v3 may experience errors, failure to execute, or unexpected behavior [5][1][6]. 2. GitHub officially recommended that users update to the latest versions of their actions to maintain compatibility with Node.js 20 [1][2]. For actions/checkout, this requires upgrading to v4 or higher [4][7][8]. 3. As of June 2026, the latest major version of actions/checkout is v7 [9][10]. It is strongly advised to migrate to at least v4, though upgrading to the latest release (v7) is recommended to ensure continued support, security updates, and feature compatibility [9][10]. In summary, actions/checkout@v3 is considered obsolete and unsupported due to its dependency on the deprecated Node.js 16 runtime [1][8]. Workflows still using it should be updated immediately to v4 or newer to ensure they run correctly on modern GitHub Actions runners [4][7].
Citations:
- 1: https://github.blog/changelog/2024-09-25-end-of-life-for-actions-node16/
- 2: https://github.blog/changelog/2024-03-06-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
- 3: Node.js 16 actions are deprecated actions/checkout#1596
- 4: Update actions/checkout to v4 for Node.js 20 compatibility supabase/supabase#27187
- 5: checkout@v3 using node20 instead of node16 actions/checkout#1809
- 6: [Windows 19 and 22] Node.js version 16 will be removed from Windows images on 2025-05-09 actions/runner-images#11710
- 7: https://stackoverflow.com/questions/76056803/update-your-actions-to-run-on-node-16-instead-of-node-12-on-github
- 8: https://github.com/actions/checkout/blob/main/CHANGELOG.md
- 9: https://github.com/actions/checkout/releases
- 10: https://github.com/actions/checkout
.github/workflows/gem-push.yml の actions/checkout を v4 以上へ更新してください。
actions/checkout@v3 は Node.js 16 系で、現在の GitHub Actions ランナーでは実行失敗する可能性があります。
修正案
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - uses: actions/checkout@v3 | |
| - uses: actions/checkout@v4 |
🧰 Tools
🪛 actionlint (1.7.12)
[error] 20-20: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 zizmor (1.26.1)
[warning] 20-23: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🤖 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/gem-push.yml at line 20, The workflow step using
actions/checkout is pinned to v3 and should be updated to v4 or newer. In
gem-push.yml, change the checkout action version in the checkout step so the
workflow uses the supported release, keeping the rest of the job logic
unchanged.
Source: Linters/SAST tools
| - name: Check if version file changed | ||
| id: version_file | ||
| run: | | ||
| if git diff --name-only HEAD~1 HEAD | grep -qx "lib/slidict/version.rb"; then | ||
| echo "changed=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "changed=false" >> "$GITHUB_OUTPUT" | ||
| fi |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
複数コミット push で version.rb の変更を見落とします。
HEAD~1..HEAD だけを見るため、同一 push 内の最後以外のコミットで lib/slidict/version.rb が変わると changed=false になり、gem publish と release publish がスキップされます。push 全体の範囲、または抽出した version の tag/release 存在確認で判定してください。
🤖 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/gem-push.yml around lines 25 - 32, The version change
check in the workflow only inspects HEAD~1..HEAD, so it can miss
lib/slidict/version.rb updates from earlier commits in the same push. Update the
logic in the version_file step to evaluate the full push range or otherwise
determine the bumped version by comparing the relevant tag/release state, and
keep the changed output accurate for gem publish and release publish.
| - name: Publish release notes | ||
| if: steps.version_file.outputs.changed == 'true' | ||
| uses: release-drafter/release-drafter@v5 | ||
| with: | ||
| config-name: release-drafter.yml | ||
| publish: true | ||
| tag: ${{ steps.version.outputs.tag }} | ||
| name: ${{ steps.version.outputs.tag }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== workflow excerpt ==\n'
nl -ba .github/workflows/gem-push.yml | sed -n '60,90p'
printf '\n== release-drafter references ==\n'
rg -n "release-drafter|actionlint|runner" .github . -g '!**/node_modules/**' || trueRepository: slidict/slidict-cli
Length of output: 221
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== workflow excerpt ==\n'
python3 - <<'PY'
from pathlib import Path
p = Path('.github/workflows/gem-push.yml')
for i, line in enumerate(p.read_text().splitlines(), 1):
if 60 <= i <= 90:
print(f"{i:4d}: {line}")
PY
printf '\n== release-drafter references ==\n'
python3 - <<'PY'
from pathlib import Path
import re
paths = [p for p in Path('.').rglob('*') if p.is_file() and '.git' not in p.parts]
pat = re.compile(r'release-drafter|actionlint|runner')
for p in paths:
try:
text = p.read_text(errors='ignore')
except Exception:
continue
if pat.search(text):
print(p)
PYRepository: slidict/slidict-cli
Length of output: 1241
🌐 Web query:
release-drafter release-drafter v5 node version v6 node version action metadata
💡 Result:
The Release Drafter GitHub Action updated its required Node.js runtime version as part of its evolution across major versions: - Version 5 of the action used Node.js 16 [1]. - Version 6 of the action updated the runtime to Node.js 20 [1][2]. - The action's metadata file (action.yml) specifies this runtime requirement under the runs.using field [1][3]. Specifically, the configuration moved from using: 'node16' in v5 to using: 'node20' in v6 [1]. These updates ensure compatibility with GitHub Actions' lifecycle transitions, as Node.js 16 was deprecated in favor of newer versions [2]. As of the current date in 2026, the action has advanced to v7 [4][5].
Citations:
- 1: release-drafter/release-drafter@v5...v6
- 2: Update Node.js to 20 release-drafter/release-drafter#1379
- 3: https://github.com/release-drafter/release-drafter/blob/b1476f6e/action.yml
- 4: https://github.com/release-drafter/release-drafter
- 5: https://github.com/release-drafter/release-drafter?tab=readme-ov-file
release-drafter を v6 に更新してください。
release-drafter/release-drafter@v5 は Node.js 16 ベースで、v6 で Node.js 20 に更新されています。ここは @v6 に上げておくべきです。
🧰 Tools
🪛 actionlint (1.7.12)
[error] 74-74: the runner of "release-drafter/release-drafter@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 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/gem-push.yml around lines 72 - 81, The Release Drafter
action in the “Publish release notes” step is still pinned to
release-drafter/release-drafter@v5; update that action reference to `@v6` in the
workflow so it uses the Node.js 20-based release, keeping the existing
config-name, publish, tag, name, and GITHUB_TOKEN settings unchanged.
Source: Linters/SAST tools
changelog.yml now only keeps a draft release updated on every push to main,
while gem-push.yml publishes that draft using the tag derived from
lib/slidict/version.rb so the GitHub release and the published gem always
share the same version.
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Summary by CodeRabbit
新機能
改善