-
Notifications
You must be signed in to change notification settings - Fork 262
feat: create github release on tag publish #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughA new GitHub Actions step named "Create GitHub Release" was added to the publish workflow. This step automatically creates GitHub releases when tags are pushed, using the create-release action with GITHUB_TOKEN authentication and configuration from the tag reference. Changes
Pre-merge checks and finishing touches✅ Passed checks (3 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - name: Create GitHub Release | ||
| if: github.ref_type == 'tag' | ||
| uses: actions/create-release@v1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| tag_name: ${{ github.ref_name }} | ||
| release_name: Release ${{ github.ref_name }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
GitHub release creation best practices 2025 actions/create-release deprecation
💡 Result:
Short answer
- actions/create-release is effectively archived/soft-deprecated; migrate off it. [1][2]
- Best replacements: use gh CLI (gh release create), Octokit/REST API, or maintained actions (release-drafter, release-please) depending on needs. [2][3][5]
Key best practices (2025)
- Prefer gh CLI or the REST API (Octokit) for robustness and long‑term support — e.g., run
gh release createin a workflow step to create releases and upload assets. [2][3] - Avoid unmaintained/archived Actions; pick actively maintained actions if you need higher‑level behavior (changelog generation, automated tagging). Examples: release-please, release-drafter. [5][2]
- Use a token with the right scope:
- GITHUB_TOKEN is fine for most tasks, but note actions triggered by GITHUB_TOKEN do NOT create new workflow runs. If you need events to trigger downstream workflows, use a PAT with appropriate scopes. [4][5]
- Pin versions and migrate off deprecated major versions (watch GitHub deprecation notices and changelog dates). Monitor repo/changelog annotations in your workflows well before deprecation brownouts. [3]
- Attach assets with gh or the official upload-release-asset endpoints (or maintained upload actions); test upload behavior and content‑type handling. [2][3]
- Implement idempotency and error handling: check for existing tags/releases, support allowUpdates or conditional create/update logic, and surface failures clearly in CI logs. [1][9]
Where I pulled these from
- actions/create-release repository archived notice. [1]
- Marketplace / action docs recommending gh CLI and examples. [2][3]
- GitHub changelog and deprecation/breaking‑changes notices (watch dates like 2025 deprecation announcements). [3]
- Docs about GITHUB_TOKEN behavior and release automation tooling (release-please). [4][5]
If you want, I can:
- produce a ready-to-drop workflow that uses gh release create (including PAT vs GITHUB_TOKEN logic), or
- scan your repo/workflows for uses of actions/create-release and produce a migration plan.
🌐 Web query:
github actions create-release@v1 maintenance status alternative
💡 Result:
Short answer: actions/create-release@v1 is archived and unmaintained (read‑only; archived Mar 4, 2021). Migrate to an actively maintained alternative such as softprops/action-gh-release, ncipollo/release-action, or other community forks. [1][2][3][4]
Suggested alternatives
- softprops/action-gh-release — actively maintained, supports assets and GHES use cases. [3]
- ncipollo/release-action — popular, supports uploading assets and body files. [4]
- kuloud/Github-Release-Action (elgohr-style) — simple release-only action. [5]
- comnoco/create-release — a maintained fork that updates APIs (drop‑in replacement for many uses). [4]
References
- actions/create-release repository (archived). [1]
- actions/create-release releases / archive notice. [2]
- softprops / action-gh-release (Marketplace / repo). [3]
- comnoco/create-release (maintained fork) and ncipollo/release-action (Marketplace). [4]
- kuloud/Github-Release-Action docs. [6]
Replace the archived actions/create-release@v1 action with an actively maintained alternative or the GitHub CLI.
The actions/create-release@v1 action has been archived since March 2021 and is no longer maintained. Use either the GitHub CLI (gh release create) or an actively maintained community action such as softprops/action-gh-release or ncipollo/release-action.
Example using gh release create:
- name: Create GitHub Release
if: github.ref_type == 'tag'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ github.ref_name }}" \
--title "Release ${{ github.ref_name }}" \
--generate-notesAlternatively, consider softprops/action-gh-release if you prefer a maintained action approach.
🤖 Prompt for AI Agents
In .github/workflows/build.yml around lines 74-81, the step using the archived
actions/create-release@v1 must be replaced with a maintained alternative; update
the step to either run the GitHub CLI or use a maintained action (e.g.,
softprops/action-gh-release or ncipollo/release-action). If using gh, replace
the uses: step with a run: step that invokes gh release create "${{
github.ref_name }}" --title "Release ${{ github.ref_name }}" (ensure
GITHUB_TOKEN is available and gh is installed or setup via actions/setup-node +
core/command if needed, and repository permissions allow write); if using
softprops/action-gh-release, replace uses: with the softprops action and pass
tag_name: ${{ github.ref_name }} and name: Release ${{ github.ref_name }} and
ensure GITHUB_TOKEN in env. Ensure the new step keeps the same if:
github.ref_type == 'tag' condition and necessary permissions/secrets are
configured.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.