Skip to content

ci: add release-plz#32

Merged
esteve merged 1 commit intoros2-rust:mainfrom
esteve:add-release-plz
Jan 2, 2026
Merged

ci: add release-plz#32
esteve merged 1 commit intoros2-rust:mainfrom
esteve:add-release-plz

Conversation

@esteve
Copy link
Contributor

@esteve esteve commented Dec 24, 2025

No description provided.

Signed-off-by: Esteve Fernandez <esteve@apache.org>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a GitHub Actions workflow for automating Rust package releases using release-plz, a tool that handles changelog generation, version bumping, and publishing to crates.io.

Key Changes

  • Adds two jobs: one for creating release PRs with version bumps and changelogs, and another for publishing releases
  • Configures GitHub App token generation to allow the workflow to trigger other workflows
  • Sets up necessary permissions and secrets for cargo registry publishing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +30
- name: Generate GitHub token
uses: actions/create-github-app-token@v2
id: generate-token
with:
# GitHub App ID secret name
app-id: ${{ secrets.APP_ID }}
# GitHub App private key secret name
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

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

The token generation and checkout steps are duplicated between the two jobs. Consider extracting these into a reusable workflow or using a composite action to reduce duplication. This would make the workflow easier to maintain and ensure consistency between jobs.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,75 @@
name: Release-plz
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

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

The workflow name uses "Release-plz" with a capital 'P', but the action and job names use "release-plz" with lowercase. Consider using consistent casing throughout, preferably matching the official tool name "release-plz" with lowercase.

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'ros2-rust' }}
permissions:
contents: write
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

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

The concurrency configuration prevents parallel runs of the PR job but doesn't apply to the release job. If multiple commits are pushed to main rapidly, multiple release jobs could run concurrently. Consider adding a similar concurrency configuration to the release-plz-release job to prevent race conditions during releases.

Suggested change
contents: write
contents: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false

Copilot uses AI. Check for mistakes.
@esteve
Copy link
Contributor Author

esteve commented Jan 2, 2026

I'll go ahead and merge this, it's the same release-plz configuration we use for rclrs.

@esteve esteve merged commit ab7e75f into ros2-rust:main Jan 2, 2026
27 checks passed
@esteve esteve deleted the add-release-plz branch January 2, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant