Skip to content

Unified publish workflow#2256

Merged
victornicolet merged 7 commits into
mainfrom
victornicolet/release-workflow-split-cli-and-core
Apr 22, 2026
Merged

Unified publish workflow#2256
victornicolet merged 7 commits into
mainfrom
victornicolet/release-workflow-split-cli-and-core

Conversation

@victornicolet
Copy link
Copy Markdown
Contributor

@victornicolet victornicolet commented Mar 25, 2026

Description of changes

Merges workflow for publishing core crates and symcc into one workflow with different targets:

  • core for all core crates (i.e. not symcc and cli)
  • symcc
  • cli for only the cli.
  • all for publishing all crates at once.
    The workflow requires a tag to decide where to publish from and at least the version of the core crates to check what is being published, or validate what core version symcc is being published on.

It requires explicit versions for what is being published depending on the target, on top of the tag that specifies what code to checkout for publishing.

Issue #, if available

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A change "invisible" to users (e.g., documentation, changes to "internal" crates like cedar-policy-core, cedar

I confirm that this PR (choose one, and delete the other options):

  • Does not update the CHANGELOG because my change does not significantly impact released code.

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

I confirm that docs.cedarpolicy.com (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar language specification.

Comment thread .github/workflows/publish.yml Fixed
Comment thread .github/workflows/publish_cli.yml Fixed
Comment thread .github/workflows/publish_symcc.yml Fixed
Signed-off-by: Victor Nicolet <victornl@amazon.com>
Signed-off-by: Victor Nicolet <victornl@amazon.com>
@victornicolet victornicolet force-pushed the victornicolet/release-workflow-split-cli-and-core branch from fa31d1b to ce4fe29 Compare March 25, 2026 19:05
@victornicolet victornicolet requested a review from Copilot March 25, 2026 19:12
Copy link
Copy Markdown
Contributor

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 refactors the release automation by moving repeated publish/validation logic into a reusable GitHub Actions workflow, and splitting CLI publishing into its own workflow so symcc can be published independently between the base crates and the CLI.

Changes:

  • Replace duplicated validation/publish steps in publish.yml and publish_symcc.yml with a new reusable workflow (publish_reusable.yml).
  • Add a new publish_cli.yml workflow to publish cedar-policy-cli separately from the base crates.
  • Update base and symcc publish workflows to call the reusable workflow with appropriate tag/version settings.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/publish.yml Switches base-crate publishing to the reusable workflow and removes CLI publishing from this workflow.
.github/workflows/publish_symcc.yml Switches SymCC publishing to the reusable workflow.
.github/workflows/publish_cli.yml Adds a new standalone CLI publishing workflow that uses the reusable workflow.
.github/workflows/publish_reusable.yml Introduces a reusable workflow encapsulating validation, version checks, and publishing logic.

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

Comment thread .github/workflows/publish_reusable.yml Outdated
Signed-off-by: Victor Nicolet <victornl@amazon.com>
@github-actions

This comment was marked as outdated.

@victornicolet victornicolet marked this pull request as ready for review March 25, 2026 19:37
Signed-off-by: Victor Nicolet <victornl@amazon.com>
@cedar-policy cedar-policy deleted a comment from github-actions Bot Mar 26, 2026
@cedar-policy cedar-policy deleted a comment from github-actions Bot Mar 26, 2026
@victornicolet victornicolet force-pushed the victornicolet/release-workflow-split-cli-and-core branch 2 times, most recently from 25bc50f to ddab8cb Compare March 26, 2026 14:53
Signed-off-by: Victor Nicolet <victornl@amazon.com>
@victornicolet victornicolet force-pushed the victornicolet/release-workflow-split-cli-and-core branch from ddab8cb to a8153fb Compare March 26, 2026 14:54
@github-actions
Copy link
Copy Markdown

Coverage Report

Head Commit: a8153fb2666048e7affbeededb10e907e4b9871f

Base Commit: cf399c60743153481d1a479ec6af0302b5566778

Download the full coverage report.

Coverage of Added or Modified Lines of Rust Code

Required coverage: 80.00%

Actual coverage: 100.00%

Status: PASSED ✅

Details
File Status Covered Coverage Missed Lines

Coverage of All Lines of Rust Code

Required coverage: 80.00%

Actual coverage: 86.81%

Status: PASSED ✅

Details
Package Status Covered Coverage Base Coverage
cedar-language-server 🟢 4722/5102 92.55% 92.55%
cedar-policy 🟡 3995/5344 74.76% 74.76%
cedar-policy-cli 🟡 1120/1565 71.57% 71.57%
cedar-policy-core 🟢 23741/27110 87.57% 87.57%
cedar-policy-formatter 🟢 914/1088 84.01% 84.01%
cedar-policy-symcc 🟢 6752/7273 92.84% 92.84%
cedar-wasm 🔴 0/28 0.00% 0.00%

@cedar-policy cedar-policy deleted a comment from github-actions Bot Mar 26, 2026
@cedar-policy cedar-policy deleted a comment from github-actions Bot Mar 26, 2026
@cedar-policy cedar-policy deleted a comment from github-actions Bot Mar 26, 2026
Comment thread .github/workflows/publish.yml Outdated
Comment thread .github/workflows/publish.yml
-p cedar-policy \
-p cedar-policy-cli
fi
# Order matters: dependencies must be listed before dependents.
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.

I don't think the order actually matters if you specify packages in a single cargo publish command.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I cannot find clear documentation that says that it does or it doesn't, and I can find some suggestions that it does. The previous workflow had the crates specified in the dependency order, so unless I'm proven wrong I'll leave it here.

Comment thread .github/workflows/publish.yml Outdated
Comment thread .github/workflows/publish.yml Outdated
Comment thread .github/workflows/publish.yml
@victornicolet victornicolet changed the title split publishing crates in two steps, core crates then cli [draft] split publishing crates in two steps, core crates then cli Mar 26, 2026
@victornicolet victornicolet marked this pull request as draft March 26, 2026 19:09
Signed-off-by: Victor Nicolet <victornl@amazon.com>
@victornicolet victornicolet force-pushed the victornicolet/release-workflow-split-cli-and-core branch from 3e5bfe2 to 3944f43 Compare March 27, 2026 20:54
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@victornicolet victornicolet marked this pull request as ready for review April 20, 2026 13:50
Copy link
Copy Markdown
Contributor

@john-h-kastner-aws john-h-kastner-aws left a comment

Choose a reason for hiding this comment

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

Looks good. I'm hoping to use this (with targets: all) for the upcoming release of 4.10.0

@victornicolet victornicolet changed the title [draft] split publishing crates in two steps, core crates then cli Split publishing crates in two steps, core crates then cli Apr 22, 2026

# Check that the input tag is welformed.
# Check that the input tag is well-formed.
# For core, cli and all, we expect a tag "v<MAJOR>.<MINOR>.<PATCH>"
Copy link
Copy Markdown
Contributor

@katherine-hough katherine-hough Apr 22, 2026

Choose a reason for hiding this comment

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

For the cli the tag should be of the form cedar-policy-cli-v<MAJOR>.<MINOR>.<PATCH> to distinguish between the release of the cli for that version and the release of the base cedar crates for that version

Copy link
Copy Markdown
Contributor Author

@victornicolet victornicolet Apr 22, 2026

Choose a reason for hiding this comment

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

Yes,I think that once the patch versions of CLI and Core start diverging, we'll need to make that change.

run: cargo publish -p cedar-policy-cli
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
publish-all:
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.

Will the procedure for patching old cedar versions be that we run publish core and then optionally publish cli?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think so?

@victornicolet victornicolet changed the title Split publishing crates in two steps, core crates then cli Unified publish workflow Apr 22, 2026
@github-actions
Copy link
Copy Markdown

Coverage Report

Head Commit: 11b563fa5d72a6cfddf6f3f8935de716409132f3

Base Commit: 090f9b5605c7d80bea64ce50282b17323e0450a3

Download the full coverage report.

Coverage of Added or Modified Lines of Rust Code

Required coverage: 80.00%

Actual coverage: 100.00%

Status: PASSED ✅

Details
File Status Covered Coverage Missed Lines

Coverage of All Lines of Rust Code

Required coverage: 80.00%

Actual coverage: 87.70%

Status: PASSED ✅

Details
Package Status Covered Coverage Base Coverage
cedar-language-server 🟢 4722/5102 92.55% --
cedar-policy 🟡 4247/5352 79.35% --
cedar-policy-cli 🟡 1222/1614 75.71% --
cedar-policy-core 🟢 23962/27240 87.97% --
cedar-policy-formatter 🟢 914/1088 84.01% --
cedar-policy-symcc 🟢 6760/7270 92.98% --
cedar-wasm 🔴 0/28 0.00% --

@victornicolet victornicolet merged commit 647029d into main Apr 22, 2026
26 checks passed
@victornicolet victornicolet deleted the victornicolet/release-workflow-split-cli-and-core branch April 22, 2026 18:03
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.

5 participants