Skip to main content

Release by Changelog

Pipeline Ruff

Release a new version of a software based on CHANGELOG.md file.

Detect the latest version in the CHANGELOG.md file and create a new release in the repository.

Release by Changelog rely on Keep a Changelog format and Semantic Versioning, following those two norms is required.

Installation

pip install --upgrade pip
pip install release-by-changelog

Usage

In a Gitlab CI pipeline, you can use the following command to release a new version of your software based on the CHANGELOG.md file.

release-by-changelog

It's recommended to add a rules section to run this command only on the default branch.

Here is an example of a .gitlab-ci.yml file using release-by-changelog:

release:
    stage: deploy
    script:
        - pip install release-by-changelog 
        - release-by-changelog
    rules:
        -   if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

release-by-changelog will read the CHANGELOG.md file and create a new tag based on the latest version found in the file. The release will be pushed to the repository.

release-by-changelog rely on the following predefined CI/CD variables to authenticate with the GitLab API:

  • CI_PROJECT_ID: Used to identify the project,
  • CI_COMMIT_SHA: Used to identify the reference,
  • CI_JOB_TOKEN: Used to authenticate with the GitLab API.
  • CI_SERVER_HOST: Used to identify the GitLab host.

Local usage

You can also use this command locally to release a new version of your software.

release-by-changelog --token <token> <project> <ref>
  • project: Path or id on host. [required]
  • ref: Can be a branch, tag, or commit SHA. [required]

The token is required to authenticate with the GitLab API. You can authenticate with the GitLab API in several ways:

Using environment variables

You can also use environment variables to avoid passing the token each time. A token passed as an argument will always take precedence over the environment variable.

export PRIVATE_TOKEN=<token>
release-by-changelog <project> <ref>

Metadata

Release files for release-by-changelog 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for release-by-changelog 0.2.3
File Size Uploaded Provenance
release_by_changelog-0.2.3.tar.gz 23.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for release-by-changelog 0.2.3
File Interpreter ABI Platform
release_by_changelog-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 33.4 kB

Release files / release_by_changelog-0.2.3.tar.gz

Download URL release_by_changelog-0.2.3.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
66098e5b0e491400d9384903a75cd296bc585fba01fa0b0d9e199df61685e2b3
BLAKE2b-256 checksum
How to use checksums
f912e6888c6da42894f0ce41d0c9a09fd9d8c91ed7ed77f64d3a37b99fc38876
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release files / release_by_changelog-0.2.3-py3-none-any.whl

Download URL release_by_changelog-0.2.3-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
deea9aa91e8bcebfcafb1554937aaf5fc024e3281d711a56cb5ec25c2a485cf4
BLAKE2b-256 checksum
How to use checksums
5ad699f56f215eca05eaedc92a12fe2072b082a788752fd349c043a1a877b965
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Security for release-by-changelog 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page