Automated patch releases for devcontainer-native on main#11
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0792a6ccc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| latest_tag=$(git tag --list "${TAG_PREFIX}*" --sort=-version:refname | head -n 1) | ||
| if [[ -z "$latest_tag" ]]; then |
There was a problem hiding this comment.
Add concurrency guard before deriving next tag
This workflow computes next_version from current tags without any concurrency key, so two push runs on main can execute in parallel, both pick the same latest_tag, and then race to publish the same release tag; one run will fail at release creation. GitHub Actions docs state the default behavior allows multiple workflow runs concurrently, so release numbering here is not safe under normal multi-push activity.
Useful? React with 👍 / 👎.
| gh release create "$tag" \ | ||
| --target "$GITHUB_SHA" \ | ||
| --title "devcontainer-native v${version}" \ |
There was a problem hiding this comment.
Fail when no new commits exist for release
gh release create is invoked without --fail-on-no-commits, and the command targets ${GITHUB_SHA}, so rerunning this workflow for an already released commit will still mint another patch tag/release for identical code. The gh release create manual explicitly says releases are created by default even when there are no new commits, which can produce duplicate releases.
Useful? React with 👍 / 👎.
|
@codex fix review suggestions |
Summary
Testing
|
Motivation
mainis updated and start semantic versioning at0.0.1for the Rust native crate.Description
.github/workflows/devcontainer-native-release.ymlthat runs onpushtomainand has permission to create releases.devcontainer-native-v, defaults from0.0.0to produce0.0.1for first release, and writesversion/tagoutputs.versionincmd/devcontainer-native/Cargo.toml, runscargo build --release, packagesdevcontainer-native-<version>-linux-x64.tar.gz, produces a SHA256 checksum, and creates a GitHub Release uploading both files using theghCLI.0.0.1by updatingcmd/devcontainer-native/Cargo.tomlandcmd/devcontainer-native/Cargo.lockso the repo starts from the requested initial version.Testing
cargo build --manifest-path cmd/devcontainer-native/Cargo.tomllocally and the build completed successfully.Codex Task