Skip to content

ci: add Rust release workflows for aws-db-esdk#2280

Open
lucasmcdonald3 wants to merge 6 commits into
mainfrom
lucmcdon/rust-publish-workflow
Open

ci: add Rust release workflows for aws-db-esdk#2280
lucasmcdonald3 wants to merge 6 commits into
mainfrom
lucmcdon/rust-publish-workflow

Conversation

@lucasmcdonald3
Copy link
Copy Markdown
Contributor

@lucasmcdonald3 lucasmcdonald3 commented May 15, 2026

Issue #, if available:

Description of changes:

Adds two GHA workflows that move RELEASE.md off developer laptops: rust-start-release.yml regenerates releases/rust/db_esdk/ and opens the release PR (steps 1–6), and rust-release.yml publishes aws-db-esdk to crates.io and runs test_published.sh on the release PR's branch (steps 7–10).

Squash/merge commit message, if applicable:

ci: add Rust release workflows for aws-db-esdk

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Publishes the aws-db-esdk crate to crates.io via GitHub Actions using
a crates.io API token issued under the Crypto Tools CI bot account
(stored as the CARGO_REGISTRY_TOKEN repo secret, gated by the
crates-io-publish environment).

Manual workflow_dispatch only. Version is taken from Cargo.toml; the
optional input acts as a typo safeguard.

Towards: P432256706
@lucasmcdonald3 lucasmcdonald3 requested a review from a team as a code owner May 15, 2026 16:59
@github-actions
Copy link
Copy Markdown

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link
Copy Markdown

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

Adds a manual Rust release workflow to publish the releases/rust/db_esdk crate (aws-db-esdk) to crates.io via an environment-gated Cargo registry token.

Changes:

  • Adds a workflow_dispatch-only Rust release workflow.
  • Reads and optionally validates the crate version before publishing.
  • Performs a Cargo dry run, then publishes using CARGO_REGISTRY_TOKEN.

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

Comment thread .github/workflows/rust-release.yml Outdated
- Match existing repo workflow style (Setup Rust Toolchain naming,
  explicit shell: bash, longpaths step, actions/checkout@v6 unnamed).
- Drop --locked: releases/rust/db_esdk/ does not commit Cargo.lock per
  start_release.sh; --locked would always fail.
- Replace fragile python3 cargo metadata parsing with jq.
- Run `./test_published.sh` after publishing (RELEASE.md step 9), with
  AWS creds for the KMS/DDB calls in examples/main.rs.
- Poll crates.io for the new version before running test_published.sh
  to mitigate index propagation lag.
@github-actions
Copy link
Copy Markdown

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

- Add rust-start-release.yml that runs DynamoDbEncryption/runtimes/rust/
  start_release.sh end-to-end on a CI runner and opens a release PR,
  removing the need to run start_release.sh on a developer laptop
  (RELEASE.md steps 1-6).
- rust-release.yml continues to handle steps 7-10 (cargo publish +
  test_published.sh) and is intended to be dispatched on the release
  PR's branch before merging, per RELEASE.md.
- Drop the silent leading-'v' strip in rust-release.yml's version check;
  N.N.N is the only valid form (per start_release.sh's regex), so
  accepting 'v1.2.5' contradicted the input description.
@lucasmcdonald3 lucasmcdonald3 changed the title ci: add Rust publish workflow for releases/rust/db_esdk ci: add Rust release workflows for aws-db-esdk May 15, 2026
@github-actions
Copy link
Copy Markdown

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

@github-actions
Copy link
Copy Markdown

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

Copy link
Copy Markdown

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/rust-start-release.yml Outdated
Comment thread .github/workflows/rust-start-release.yml
Comment thread .github/workflows/rust-start-release.yml Outdated
Address PR review feedback:
- Drop the misleading 'or after merging' option from the generated PR
  body; rust-release.yml must run on the unmerged PR's branch.
- Hard-fail dispatch on a non-default branch via 'if' guard, and pass
  ref: main explicitly to actions/checkout to avoid mixing in unrelated
  branch changes when someone dispatches from a feature branch.
- Push the release branch and open the PR using the Crypto Tools CI
  bot's PAT (pulled from AWS Secrets Manager via the existing
  GitHub-CI-CI-Bot-Credential-Access-Role) instead of the default
  GITHUB_TOKEN, so the resulting pull_request event triggers the
  repo's normal required-checks workflows. Mirrors semantic_release.yml.
@github-actions
Copy link
Copy Markdown

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

@github-actions
Copy link
Copy Markdown

Detected changes to the release files or to the check-files action

@github-actions
Copy link
Copy Markdown

Changes to the release files or the check-files action requires 2 approvals from CODEOWNERS

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