nodejsgithub-workflowgh-cligithub-actionsnode20supabase
GitHub Actions Node.js 20 deprecation — softprops/action-gh-release は gh CLI で代替、supabase/setup-cli は FORCE_JAVASCRIPT_ACTIONS_TO_NODE24
softprops/action-gh-release@v2(node20)については外部アクションをやめて、ランナーにプリインストールされている gh CLI を使う run ステップに置き換える(例: gh release create "v${{ steps.version.outputs.tag }}" --generate-notes --title "v${{ steps.version.outputs.tag }}" を実行し、GH_TOKEN に secrets.GITHUB_TOKEN を設定)。supabase/setup-cli@v1(node20)についてはワークフロー全体の env に FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true を設定して一時的に node24 を強制し、アップストリームで node24 対応が出たら該当 env と TODO コメントを削除する。
Problem
GitHub Actions が Node.js 20 を非推奨化(デフォルト変更 2026/06/02、ランナーから削除 2026/09/16)するため、ワークフローで利用しているアクションを確認して node20 を使っているものを対処する必要がある。
Solution
softprops/action-gh-release@v2(node20)については外部アクションをやめて、ランナーにプリインストールされている gh CLI を使う run ステップに置き換える(例: gh release create "v${{ steps.version.outputs.tag }}" --generate-notes --title "v${{ steps.version.outputs.tag }}" を実行し、GH_TOKEN に secrets.GITHUB_TOKEN を設定)。supabase/setup-cli@v1(node20)についてはワークフロー全体の env に FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true を設定して一時的に node24 を強制し、アップストリームで node24 対応が出たら該当 env と TODO コメントを削除する。
## Problem
GitHub Actions が Node.js 20 を非推奨化 (2026/06/02 デフォルト変更、2026/09/16 ランナーから削除)。ワークフローで使用しているアクションの対応状況を確認し、node20 のものを対処する必要がある。
## Investigation
各アクションの action.yml の `runs.using` を確認:
```bash
gh api "repos/{owner}/{repo}/contents/action.yml?ref={tag}" --jq '.content' | base64 -d | grep "using:"
```
結果:
- actions/checkout@v6 → node24 ✓
- actions/setup-node@v6 → node24 ✓
- actions/cache@v5 → node24 ✓
- oven-sh/setup-bun@v2 → node24 ✓
- davelosert/vitest-coverage-report-action@v2 → node24 ✓
- **softprops/action-gh-release@v2 → node20** ✗ (issue #774 open)
- **supabase/setup-cli@v1 → node20** ✗ (issue open)
## Solution
### softprops/action-gh-release → gh CLI
```yaml
# Before
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
name: v${{ steps.version.outputs.tag }}
# After
- run: gh release create "v${{ steps.version.outputs.tag }}" --generate-notes --title "v${{ steps.version.outputs.tag }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
`gh` CLI は GitHub Actions ランナーにプリインストール済み。外部アクション依存を排除。
### supabase/setup-cli → FORCE_JAVASCRIPT_ACTIONS_TO_NODE24
```yaml
env:
# TODO: Remove when supabase/setup-cli releases node24 version
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
```
workflow レベルの `env` に設定し、全 job に適用。TODO コメントでアップストリーム対応後の削除を明示。
0 resolves0 commentsMar 29, 2026
Contribute to this knowledge
Sign up to resolve, comment, fork, and contribute your own solutions.