Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

chore: consolidate release workflows#211

Merged
shikhar merged 1 commit intomainfrom
fix-release-plz
Jan 27, 2026
Merged

chore: consolidate release workflows#211
shikhar merged 1 commit intomainfrom
fix-release-plz

Conversation

@shikhar
Copy link
Member

@shikhar shikhar commented Jan 27, 2026

Summary

  • Merge release-tag.yml into release.yml for a single release workflow
  • Trigger on release PR merge instead of tag push (GITHUB_TOKEN-created tags don't trigger workflows)
  • Add release_plz job to handle: git tag, crates.io publish, GitHub release with changelog
  • Enable git_tag_enable and git_release_enable in release-plz config

Flow

  1. Push to main → release-plz creates/updates release PR
  2. Merge release PR → release.yml runs:
    • release_plz: tag + crates.io + GitHub release
    • build_binaries: cross-platform builds + signing
    • upload_release_artifacts: attach binaries to release
    • update_homebrew: update formula

🤖 Generated with Claude Code

@shikhar shikhar requested a review from a team as a code owner January 27, 2026 00:55
@greptile-apps
Copy link

greptile-apps bot commented Jan 27, 2026

Greptile Overview

Greptile Summary

This PR fixes the release automation by enabling release-plz to publish directly to crates.io and creates tags/releases that trigger downstream workflows.

Key changes:

  • Configured release-plz to publish to crates.io by passing CARGO_REGISTRY_TOKEN and enabling publish in config
  • Changed workflow trigger from tag push to PR merge with release label to avoid GitHub's limitation where tags created by GITHUB_TOKEN don't trigger workflows
  • Enabled git_release_enable in release-plz config for automated GitHub release creation
  • Removed manual cargo publish step from release.yml since release-plz now handles it

Note: Both release-tag.yml and release.yml now trigger simultaneously on PR merge. The softprops/action-gh-release@v2 action in release.yml will handle tag creation gracefully if the tag already exists from release-plz, but verify this doesn't cause any race conditions in practice.

Confidence Score: 4/5

  • This PR is safe to merge with minor risk of race conditions between parallel workflows
  • The changes correctly address the GitHub workflow trigger limitation and enable automated publishing. The logic is sound and aligns with the stated goals. However, the score is 4 instead of 5 due to the potential race condition between release-tag.yml and release.yml both running on PR merge - while the softprops/action-gh-release action should handle duplicate tag creation gracefully, this should be verified in practice.
  • Monitor .github/workflows/release.yml for potential race conditions with parallel workflow execution

Important Files Changed

Filename Overview
.github/workflows/release-tag.yml Added CARGO_REGISTRY_TOKEN to enable publishing to crates.io, renamed job from release-tag to release
.github/workflows/release.yml Changed trigger from tag push to PR merge, removed manual cargo publish step, added tag_name parameter to release creation - potential race condition with parallel workflow
release-plz.toml Removed publish = false to enable crates.io publishing, enabled git_release_enable for GitHub releases

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant PR as Release PR
    participant RTW as release-tag.yml
    participant RW as release.yml
    participant RP as release-plz
    participant Crates as crates.io
    participant GH as GitHub Releases
    participant HB as Homebrew

    Dev->>PR: Merge PR with 'release' label
    
    par Parallel Workflows
        PR->>RTW: Trigger workflow
        PR->>RW: Trigger workflow
    end
    
    RTW->>RP: Run release-plz release
    RP->>Crates: Publish to crates.io
    RP->>GH: Create git tag
    RP->>GH: Create GitHub release
    
    RW->>RW: Build binaries (8 targets)
    RW->>RW: Sign & notarize macOS binaries
    RW->>GH: Create/update release with tag_name
    GH-->>RW: Tag exists or created
    RW->>GH: Upload binary artifacts
    RW->>HB: Update homebrew formula
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

- Pass CARGO_REGISTRY_TOKEN to release-plz for crates.io publishing
- Trigger release.yml on PR merge instead of tag push
- Explicitly enable git tagging and releases in release-plz config

GITHUB_TOKEN-created tags don't trigger other workflows, so we now
trigger on release PR merge directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@shikhar shikhar changed the title fix: have release-plz publish to crates.io directly chore: consolidate release workflows Jan 27, 2026
@shikhar shikhar merged commit 05496a5 into main Jan 27, 2026
6 checks passed
@shikhar shikhar deleted the fix-release-plz branch January 27, 2026 01:10
@github-actions github-actions bot mentioned this pull request Jan 27, 2026
shikhar pushed a commit that referenced this pull request Jan 27, 2026
## 🤖 New release

* `s2-cli`: 0.25.1 -> 0.25.2

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.25.2] - 2026-01-27

### Bug Fixes

- Add `S2_SSL_NO_VERIFY` config
([#210](#210))

### Miscellaneous Tasks

- Release cmd
- Automate releases with release-plz
- Add dependabot for weekly dependency updates
([#208](#208))
- Consolidate release workflows
([#211](#211))

<!-- generated by git-cliff -->
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant