rustyphoenixcommitrelease 1.3.0

Commits, tags and pushes a Phoenix release
rustyphoenixcommitrelease-1.3.0 is not a library.

pipeline status Latest release coverage report documentation Phoenix2 documentation DOI

RustyPhoenixCommitRelease

phoenix_commit_release commits, tags and pushes a Phoenix release, replacing the hand-rolled shell script previously used in the commit-release CI component of phoenixcitoolkit. Changelog generation and release-notes generation (the GitLab Release description) are handled separately, outside this tool.

It expects git to be available on PATH, and the changelog at --changelog-path to already be up to date (generated upstream of this tool).

Usage

phoenix_commit_release \
  --repo-path "$CI_PROJECT_DIR" \
  --version "$REPLACE_VERSION" \
  --current-version "$CURRENT_VERSION" \
  --server-host "$CI_SERVER_HOST" \
  --project-path "$CI_PROJECT_PATH" \
  --branch "$CI_COMMIT_BRANCH" \
  --extra-files "Cargo.toml Cargo.lock"

GITLAB_TOKEN or GL_TOKEN must be set in the environment (same convention as @semantic-release/gitlab); it is never accepted as a CLI argument so it does not leak through the process list or job logs.

Steps performed:

  1. git config --global --add safe.directory <repo-path> (the image runs as a non-root user, the checkout may be owned by another one).
  2. Rewrites the origin remote to an authenticated HTTPS URL built from --server-host / --project-path and the token.
  3. git adds pixi.toml, codemeta.json, the changelog and every --extra-files entry that exists on disk, so the same invocation works unmodified for C++/Rust/Python projects.
  4. Commits with a fixed bot identity (Phoenix CI <ci@phoenix.invalid> by default, overridable with --author-name/--author-email) and pushes it to --branch.
  5. Tags the commit with --version and pushes the tag as a real git push (a tag created only through the GitLab Releases API does not honor [skip ci] on the tagged commit).
  6. Writes --env-output (release-commit.env by default) with RELEASE_COMMIT_SHA, REPLACE_VERSION and CURRENT_VERSION, for GitLab's dotenv artifact report.