Skip to content

Publish GitHub release after release jobs#5468

Open
clockwork-labs-bot wants to merge 5 commits into
masterfrom
bot/publish-github-release-after-steps
Open

Publish GitHub release after release jobs#5468
clockwork-labs-bot wants to merge 5 commits into
masterfrom
bot/publish-github-release-after-steps

Conversation

@clockwork-labs-bot

@clockwork-labs-bot clockwork-labs-bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Adds a final publish-github-release job to the manual release workflow. On non-dry-run releases, it waits for all release jobs to finish successfully or be skipped, then calls cargo-release release github-release.

The new release-tool target verifies the target GitHub release is still a draft, dispatches attach-artifacts.yml using the workflow URL returned by gh workflow run, waits for that artifact workflow to complete, and then publishes the release. If the release is already published, the command exits successfully without re-uploading artifacts.

API and ABI breaking changes

None.

Expected complexity level and risk

  1. Workflow-only release behavior plus a new cargo-release target. The risky part is release sequencing, so the workflow keeps explicit needs checks and the publish logic fails before publication if artifact attachment does not succeed.

Testing

  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release.yml")'
  • git diff --check
  • PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo check --manifest-path tools/release/Cargo.toml
  • PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH cargo run --manifest-path tools/release/Cargo.toml -- release github-release --help
  • actionlint .github/workflows/release.yml was not run because actionlint is not installed locally.

Comment thread .github/workflows/release.yml Outdated
--ref master \
-f "release_tag=${RELEASE_TAG}"

run_id=""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

gh workflow run returns the url of the workflow. use that instead.

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.

Moved the artifact dispatch into cargo-release release github-release; it now uses the workflow URL returned by gh workflow run instead of polling for a matching run.

Comment thread .github/workflows/release.yml Outdated
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ github.event.inputs.release_tag }}
steps:
- name: Verify release exists

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please convert this entire job into something under cargo-release and call it in a single step here

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.

Done in 18bf4deda: the workflow job now downloads cargo-release and calls a single cargo-release release github-release ... step. The release/artifact/publish logic lives under tools/release/src/targets/github_release.rs.

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