Skip to content

Add Release Drafter configuration and workflow#457

Merged
rahulharpal1603 merged 5 commits intoAOSSIE-Org:mainfrom
rohan-pandeyy:enhancement/cicd-release-drafter
Jul 11, 2025
Merged

Add Release Drafter configuration and workflow#457
rahulharpal1603 merged 5 commits intoAOSSIE-Org:mainfrom
rohan-pandeyy:enhancement/cicd-release-drafter

Conversation

@rohan-pandeyy
Copy link
Contributor

@rohan-pandeyy rohan-pandeyy commented Jul 8, 2025

Fixes #455
Introduces a Release Drafter config file and GitHub Actions workflow to automate release note generation and drafting on pushes to main and closed pull requests.

Changes:

  • Add .github/release-drafter-config.yml (Configuration for the Release Drafter bot)
  • Add .github/workflows/update-release-drafter.yml (GitHub Actions workflow that runs the Release Drafter bot on PR merge / push to main)

Test:

The example PR under "Features" was labeled enhancement or UI.
Similarly for "Bug Fixes" & "Documentation"; label was bug and documentation respectively.
All the PRs under "Others" had none of the above mentioned labels.
image
Changelog config goes like: $TITLE (#$NUMBER) by @$AUTHOR

Summary by CodeRabbit

  • Chores
    • Added automated release note generation and categorization for pull requests.
    • Introduced a workflow to update release drafts automatically on main branch updates and closed pull requests.
    • Updated release workflow to trigger on release publishing and dynamically use release tags without creating draft releases.

Introduces a Release Drafter config file and GitHub Actions workflow to automate release note generation and drafting on pushes to main and closed pull requests.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 8, 2025

"""

Walkthrough

Two new files are introduced: a Release Drafter configuration and a GitHub Actions workflow. The configuration file specifies templates and categories for automated release notes, while the workflow triggers on main branch pushes and closed pull requests to update the release draft using the defined configuration. Additionally, the existing build-and-release workflow is modified to trigger on release publishing and to use the release tag dynamically without drafting the release.

Changes

File(s) Change Summary
.github/release-drafter-config.yml Added configuration for automated release notes: templates, categories, and formatting.
.github/workflows/update-release-drafter.yml Added workflow to trigger Release Drafter on push/PR close, updating draft releases accordingly.
.github/workflows/build-and-release.yml Modified to trigger on release published event; updated Tauri release action to use dynamic tag and disable draft.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub
    participant UpdateReleaseDraftWorkflow
    participant ReleaseDrafter

    GitHub->>UpdateReleaseDraftWorkflow: Push to main or PR closed
    UpdateReleaseDraftWorkflow->>UpdateReleaseDraftWorkflow: Checkout repository
    UpdateReleaseDraftWorkflow->>ReleaseDrafter: Run Release Drafter with config
    ReleaseDrafter->>GitHub: Update draft release notes
Loading

Assessment against linked issues

Objective Addressed Explanation
Modify workflow to automatically generate a changelog during the release process (#455)
Automatically populate the release body with summary of merged PRs, contributor usernames, etc (#455)

Poem

In the warren of code, a drafter appears,
Release notes now bloom as each version nears.
With hops and with tags, the changelog is spun,
Contributors cheered for the work they have done.
🐇✨
Automated and tidy, the bunny approves—
PictoPy’s releases with every move!
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1348fbf and 1f77c0f.

📒 Files selected for processing (1)
  • .github/workflows/build-and-release.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build-and-release.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Tauri Tests

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/release-drafter-config.yml (1)

28-30: Add trailing newline to satisfy YAML linting

YAML files should end with a single newline to avoid tooling warnings (new-line-at-end-of-file).
Add an empty line after $CONTRIBUTORS.

-$CONTRIBUTORS
+\$CONTRIBUTORS
+
.github/workflows/update-release-drafter.yml (1)

18-18: Consider bumping Release Drafter action to the latest major

release-drafter/release-drafter@v6 is the current major and receives fixes & features.
Switching keeps the workflow future-proof.

-        uses: release-drafter/release-drafter@v5
+        uses: release-drafter/release-drafter@v6
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2055c2b and 451ba13.

📒 Files selected for processing (2)
  • .github/release-drafter-config.yml (1 hunks)
  • .github/workflows/update-release-drafter.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/release-drafter-config.yml

[error] 30-30: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Tauri Tests

Including .github/ before release-drafter-config.yml in config-name, causes a file not found error.
stack: 'Error: Configuration file .github/.github/release-drafter-config.yml is not found.
The suggestion by coderabbitai seems to be incorrect.
@rahulharpal1603
Copy link
Contributor

rahulharpal1603 commented Jul 9, 2025

Hi @rohan-pandeyy, as we discussed in the Discord server, our build-and-release workflow should also be modified.
It should upload its artifacts to the draft release created by the release-drafter.

See: https://github.com/tauri-apps/tauri-action?tab=readme-ov-file#usage:~:text=This%20GitHub%20Action%20has%20three%20main%20usages%3A%20test%20the%20build%20pipeline%20of%20your%20Tauri%20app%2C%20uploading%20Tauri%20artifacts%20to%20an%20existing%20release

@rahulharpal1603 rahulharpal1603 added enhancement New feature or request CI/CD labels Jul 9, 2025
@rohan-pandeyy
Copy link
Contributor Author

Thanks for pointing this out @rahulharpal1603, I'll commit the changes ASAP.

Alright, this is what it looks like after all the changes
- The tag template follows this naming convention: vMAJOR.MINOR.PATCH
- The name of the Release will be: PictoPy vMAJOR.MINOR.PATCH
- The Tauri Action will automatically be trigger when Publish Release is pressed.
- The artifacts will be attached to the current draft (made by Release Drafter)

The overall thing is: PR merged > Draft updated > Manual Publish of the release > Auto build-and-release upload
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/release-drafter-config.yml (1)

28-30: Add missing trailing newline to satisfy YAMLlint & editors

YAMLlint is reporting “no new line character at the end of file”.
A terminal newline is required by POSIX tools and prevents noisy diffs when the next line is appended.

-  $CONTRIBUTORS
+  $CONTRIBUTORS
+
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 520c9ff and 1348fbf.

📒 Files selected for processing (2)
  • .github/release-drafter-config.yml (1 hunks)
  • .github/workflows/build-and-release.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/release-drafter-config.yml

[error] 30-30: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Tauri Tests
🔇 Additional comments (1)
.github/workflows/build-and-release.yml (1)

3-4: Confirm this trigger is what you want – it fires after a release is published

release: types: [published] only runs once the draft is manually published (or auto-published) on GitHub.
If you intend to upload the build artifacts to the draft generated by Release Drafter, use types: [released] or created/edited instead. Otherwise the workflow runs too late and may force an extra release cycle.

Increased fault tolerance in case of a manual triggers.
@rahulharpal1603 rahulharpal1603 merged commit f6d87f3 into AOSSIE-Org:main Jul 11, 2025
5 checks passed
@rahulharpal1603
Copy link
Contributor

Thank you @rohan-pandeyy for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Add Automatic Changelog to GitHub Release Workflow

2 participants

Comments