molt git-tag
Create annotated git tags for released packages, without publishing.
Synopsis
Description
molt git-tag creates one git tag per released package at its current version. molt publish tags automatically after a successful upload; molt git-tag is the standalone verb for when you tag separately -- for example a release job that publishes and a later job that tags, or a repo that publishes elsewhere.
Tag shape depends on the project:
- Workspace / monorepo:
<name>@<version>, with the name normalized per PEP 503 (Foo_Barandfoo-barproduce the same tag). - Single-package project:
v<version>.
Tags are annotated (git tag <t> -m <t>) so that git push --follow-tags picks them up; lightweight tags would be skipped. Tagging is idempotent -- a tag that already exists is skipped, so re-running is safe.
--output (or MOLT_OUTPUT) writes an NDJSON stream of {"type":"git-tag", "tag": ..., "packageName": ...} events, one per line. The output file is always created, even when there is nothing to tag.
The deprecated tag alias
molt tag is accepted as a deprecated alias of molt git-tag. It prints a warning advising you to use git-tag, then runs the same behavior. The canonical molt git-tag prints no warning.
Options
Exit codes
Examples
Tag every released package:
Preview the tags:
Record tag events for CI:
Push the annotated tags:
See also
- molt publish -- tags automatically after upload.
- The release workflow.