Skip to content

publish GH workflow - #554

Merged
brozorec merged 7 commits into
mainfrom
publish-workflow
Jan 28, 2026
Merged

brozorec merged 7 commits into
mainfrom
publish-workflow

Conversation

@brozorec

@brozorec brozorec commented Jan 21, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds a gh action for publishing some of the workspace members to crates.io. It also sets an explicit version to "stellar-contract-utils" in the main Cargo.toml, because "stellar-tokens" depends on it and cannot be published without explicit version.
Also added codeowners.

Summary by CodeRabbit

  • Chores
    • Added automated workflow to streamline release publishing
    • Updated dependency version constraints for consistency
    • Added code ownership configuration

✏️ Tip: You can customize this high-level summary in your review settings.

@brozorec
brozorec requested a review from ozgunozerk January 21, 2026 13:11
@brozorec brozorec self-assigned this Jan 21, 2026
@coderabbitai

coderabbitai Bot commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Walkthrough

This pull request establishes project governance and automation infrastructure by adding a CODEOWNERS file, introducing a GitHub Actions workflow for automated crate publishing, and explicitly versioning a workspace dependency constraint.

Changes

Cohort / File(s) Summary
Project Governance
.github/CODEOWNERS
Designates two code owners for repository access and review governance
CI/CD Automation
.github/workflows/publish-crates.yml
Introduces workflow for automated publishing of seven Rust crates to crates.io, with dry-run validation and tag-triggered deployment
Dependency Management
Cargo.toml
Adds explicit version constraint (0.6.0) to stellar-contract-utils workspace dependency while maintaining local path reference

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 The owners now stand guard with care,
Workflows publish crates through the air,
Versions pinned with precision true,
Automation dreams come into view! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'publish GH workflow' is vague and partially related to the main change. While the PR does add a GitHub workflow for publishing, the title lacks specificity about publishing to crates.io and omits other significant changes like setting explicit versions and adding CODEOWNERS. Consider a more descriptive title such as 'Add crates.io publishing workflow and update stellar-contract-utils version' to better reflect all changes in the PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The PR description explains the changes and rationale clearly, addressing the workflow addition, version pinning requirement, and CODEOWNERS addition. However, it does not follow the provided template structure with sections like 'Fixes', 'Tests', or 'Documentation' checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch publish-workflow

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/publish-crates.yml:
- Around line 44-48: The Publish job is running in parallel with dry-run; add an
explicit dependency so publishing only runs after dry-run succeeds by adding a
needs: [dry-run] entry to the publish job definition (reference the job id
"publish" and the dry-run job id "dry-run") so the publish job will wait for the
dry-run job to complete successfully.
🧹 Nitpick comments (1)
.github/workflows/publish-crates.yml (1)

7-9: Consider using a stable ref for concurrency grouping.

For tag pushes, ${{ github.head_ref || github.run_id }} makes the group unique per run, so cancel-in-progress won’t de‑dupe. Using github.ref_name will group by tag.

♻️ Suggested tweak
 concurrency:
-  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+  group: ${{ github.workflow }}-${{ github.ref_name }}
   cancel-in-progress: true

Comment thread .github/workflows/publish-crates.yml Resolved
@codecov

codecov Bot commented Jan 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.08%. Comparing base (ab67189) to head (0358710).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #554   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files          54       54           
  Lines        5215     5215           
=======================================
  Hits         5011     5011           
  Misses        204      204           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Comment thread Cargo.toml Resolved
@ozgunozerk

Copy link
Copy Markdown
Collaborator

I can suggest another approach for this one, that optimizes/improves the following points:

  • put a sleep between the dependencies, so that build wouldn't fail if there are some latency from crates.io.

          # Publish stellar-contract-utils before its dependents
          - name: Publish stellar-contract-utils
            run: cargo publish -p stellar-contract-utils --target wasm32v1-none --token ${{ secrets.CRATES_IO_TOKEN }}
          
          # Wait for crates.io to index
          - name: Wait for stellar-contract-utils availability
            run: sleep 45
          
          # Now publish dependent crates
          - name: Publish stellar-tokens
            run: cargo publish -p stellar-tokens --target wasm32v1-none --token ${{ secrets.CRATES_IO_TOKEN }}
  • I don't think this dependency issue between stellar-tokens and stellar-contract-utils will matter on dry-run stage, but I haven't double checked tbh, so I don't think we need to skip stellar-tokens in the dry-run:

    We can remove the comment there, and include stellar-tokens. But if you have already tried and it fails, then it's ok as is.

  • verification step -> so that we know they are properly published. Cargo gives us search tool:

    - name: Verify publication
      run: |
        sleep 60
        cargo search stellar-tokens --limit 1

@brozorec

Copy link
Copy Markdown
Collaborator Author

put a sleep between the dependencies, so that build wouldn't fail if there are some latency from crates.io.

That's a good idea, but is this needed here? Between utils and tokens, we publish other 3 crates, so it seems to me there's enough time to account for latency.

But if you have already tried and it fails, then it's ok as is.

Yep, it fails.

verification step -> so that we know they are properly published. Cargo gives us search tool:

The search command returns a result, we need to parse it and check the version is correct. That will require more work on creating script and at the end, not sure if it's that useful because if the publication fails, the action will fail. So the verification is kinda implicit.

@ozgunozerk

Copy link
Copy Markdown
Collaborator

That's a good idea, but is this needed here? Between utils and tokens, we publish other 3 crates, so it seems to me there's enough time to account for latency.

I'm not sure whether it is needed or not, I don't know how crates.io latencies are in this regard. Let's put it as a comment (if fails, put sleep), and proceed if this works for now :)

On your other comments, sounds good to me, no need to further complicate this, good job overall!

@brozorec
brozorec requested a review from ozgunozerk January 28, 2026 09:45
@brozorec
brozorec merged commit 26f939c into main Jan 28, 2026
6 checks passed
@brozorec
brozorec deleted the publish-workflow branch January 28, 2026 10:41
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.

2 participants