rustyphoenixcommitrelease 1.3.0

Commits, tags and pushes a Phoenix release
[![pipeline status](https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/ci-toolkit/RustyPhoenixCommitRelease/badges/main/pipeline.svg?ignore_skipped=true)](https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/ci-toolkit/RustyPhoenixCommitRelease/-/pipelines)
[![Latest release](https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/ci-toolkit/RustyPhoenixCommitRelease/-/badges/release.svg)](https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/ci-toolkit/RustyPhoenixCommitRelease/-/releases)
[![coverage report](https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/ci-toolkit/RustyPhoenixCommitRelease/badges/main/coverage.svg)](https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/ci-toolkit/RustyPhoenixCommitRelease/coverage/index.html)
[![documentation](doc/images/documentation_logo.svg)](https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/ci-toolkit/RustyPhoenixCommitRelease/)
[![Phoenix2 documentation](https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/PHOENIX2/-/raw/e9bdfd51a202d7825f38cda136c9287f9cee3c1c/doc/badge_phoenix2_documentation.svg)](https://cta-lapp.pages.in2p3.fr/PHOENIX_LIBS2/PHOENIX2/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21921378.svg)](https://doi.org/10.5281/zenodo.21921378)

# 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](https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/citoolkit/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

```sh
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 add`s `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.