|
| 1 | +# semvertag 0.6.0 — `dry-run` on the composite action |
| 2 | + |
| 3 | +**Minor release exposing `--dry-run` through `modern-python/semvertag@v0` and removing the action-smoke side-effect smell.** Pure action + CI change — the CLI is unchanged from 0.5.0 (no Python source touched). Consumers who don't need the new input can keep using `@v0` exactly as before; the input is opt-in. |
| 4 | + |
| 5 | +If you don't use the composite action and only consume `semvertag` directly via `uvx`, you can skip this release — there's no CLI change. |
| 6 | + |
| 7 | +## What landed |
| 8 | + |
| 9 | +- **`dry-run` input on `action.yml`** (default `'false'`). When `true`, the composite passes `--dry-run` to `semvertag tag`; semvertag short-circuits before `provider.create_tag` and the existing case block normalizes `status="dry_run"` to the public `status="no-bump"`. The action's `bump` / `tag` outputs reflect what *would* have happened. ([PR #16](https://github.com/modern-python/semvertag/pull/16)) |
| 10 | +- **`action-smoke` (this repo's CI) becomes structurally side-effect-free.** Two layers of protection: |
| 11 | + - Layer 1: `with: { dry-run: 'true' }` on `uses: ./` — semvertag never attempts a push. |
| 12 | + - Layer 2: `permissions: contents: write` removed — even a future regression that bypassed dry-run would 403 on the API. |
| 13 | +- **Assertion reduced** from two lines (`status == no-bump` AND `bump == none`) to one (`status == no-bump`). Under dry-run, `bump` is unstable (reflects the would-be value) — the old check would fail on any PR where main HEAD was an untagged `feat/`/`bugfix/` merge. Status normalization is the real wiring contract; the single check catches a regression loudly (a unwired dry-run would surface as `created`). |
| 14 | +- **CLI version floor in `action.yml` bumps** from `>=0.3.1,<1` to `>=0.5.0,<1` (the release that ships `--dry-run`). |
| 15 | +- **`docs/providers/github.md` gets a `## Preview the next bump` section** with both the action-input example and the equivalent local `uvx` invocation. |
| 16 | + |
| 17 | +## Usage |
| 18 | + |
| 19 | +```yaml |
| 20 | +- id: semvertag |
| 21 | + uses: modern-python/semvertag@v0 |
| 22 | + with: |
| 23 | + dry-run: true |
| 24 | +- if: steps.semvertag.outputs.bump != 'none' |
| 25 | + run: echo "Next release would be ${{ steps.semvertag.outputs.tag }} (${{ steps.semvertag.outputs.bump }} bump)" |
| 26 | +``` |
| 27 | +
|
| 28 | +Under `dry-run: true`, the action's `status` output is `no-bump` (no real tag was pushed). The `bump` and `tag` outputs reflect what *would* have happened, so a downstream conditional like the one above can branch on the planned bump. |
| 29 | + |
| 30 | +## Why |
| 31 | + |
| 32 | +PR #14 (in 0.5.0) surfaced the smell: `action-smoke` ran semvertag against the real `main` with `contents: write`, and when main HEAD wasn't already tagged, the smoke test pushed a real release tag from a PR's CI run. 0.5.0 shipped the CLI half (`--dry-run`); 0.6.0 wires it through the composite and switches the smoke job to use it. After this release: |
| 33 | + |
| 34 | +- `action-smoke` is provably side-effect-free regardless of main HEAD's tag state. |
| 35 | +- The brittle "main HEAD is always already-tagged" assumption is gone — the test asserts the dry-run wiring, not an external invariant. |
| 36 | +- Any consumer who wants to preview the next bump from a workflow can opt in via the same input. |
| 37 | + |
| 38 | +## Breaking changes |
| 39 | + |
| 40 | +None. `dry-run` defaults to `'false'`; existing `uses: modern-python/semvertag@v0` invocations behave identically to 0.5.x. |
| 41 | + |
| 42 | +The version floor bump (`>=0.3.1,<1` → `>=0.5.0,<1`) is internal to the action — consumers who pin `@v0` don't see it directly. If anyone was somehow consuming `action.yml` outside the `@v0` pin and pinning an old `semvertag` themselves, they'd need to upgrade to 0.5.0+. No known consumer pattern matches this. |
| 43 | + |
| 44 | +## Release procedure |
| 45 | + |
| 46 | +`tag-major.yml` automatically updates the floating `v0` tag on release-published, so the steps from 0.4.0's manual bootstrap are no longer needed. |
| 47 | + |
| 48 | +```sh |
| 49 | +gh release create 0.6.0 \ |
| 50 | + --title '0.6.0 — dry-run on the composite action' \ |
| 51 | + --notes-file planning/releases/0.6.0.md |
| 52 | +``` |
| 53 | + |
| 54 | +`publish.yml` fires on release creation and pushes 0.6.0 to PyPI. `tag-major.yml` fires in parallel and force-updates `v0` to point at the 0.6.0 commit. |
| 55 | + |
| 56 | +## See also |
| 57 | + |
| 58 | +- Spec: `planning/specs/2026-06-09-action-yml-dry-run-design.md` |
| 59 | +- Implementation plan: `planning/plans/2026-06-09-action-yml-dry-run.md` |
| 60 | +- PR: [#16](https://github.com/modern-python/semvertag/pull/16) |
| 61 | +- Predecessor (CLI half): [PR #15](https://github.com/modern-python/semvertag/pull/15) — semvertag 0.5.0 |
| 62 | +- Original smell surfacing: [PR #14](https://github.com/modern-python/semvertag/pull/14) — mkdocs deploy + the action-smoke side-effect discovery |
0 commit comments