Skip to main content

Changesets-style release automation on top of scriv

Project description

scriv-release

PyPI Python versions CI License

Changesets-style release automation on top of scriv.

scriv already manages per-PR changelog fragments. scriv-release adds the missing pieces for fully automated releases:

  1. A policy for mapping changelog categories to semver bump levels.
  2. Orchestration commands (bump-level, next-version, collect, tag) that wrap scriv and a configurable version provider.
  3. A GitHub Action that opens a "Changelog Preview" PR when fragments are pending, and tags a release once that PR is merged — the same flow popularized by Changesets in the JS ecosystem.

Quickstart

pip install "scriv-release[bump-my-version]"
# pyproject.toml
[tool.scriv-release]
version_provider = "bump-my-version"

In your repo's .github/workflows/release.yml:

on:
  push:
    branches: [main]

permissions: {}

jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
          persist-credentials: false

      - uses: whitphx/scriv-release@v0.4.0
        with:
          client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
          app-private-key: ${{ secrets.RELEASE_APP_KEY }}

RELEASE_APP_CLIENT_ID and RELEASE_APP_KEY come from a GitHub App that you own. The action mints a short-lived installation token from the App so the tag-push it does at release time can trigger downstream workflows (the default GITHUB_TOKEN cannot — by design, to avoid recursion). To skip the manual App-creation flow, open

https://whitphx.github.io/scriv-release/install-app/

and click Create on your personal account (or fill the org name). GitHub's confirmation page is pre-populated with the recommended permissions (contents: write, pull_requests: write); submit, and the App is registered under your account. The page then walks you through generating a key, installing the App on the repo, and setting the secrets. See docs/token-setup.md for the longer explanation and a manual fallback.

For end-to-end onboarding, see docs/quickstart.md.

How it works

Two phases, branched on whether changelog fragments are present on HEAD:

  • Fragments presentscriv collect into a scriv-release-preview branch and open/update a "Changelog Preview" PR.
  • No fragments on HEAD, but fragments on HEAD~1 → that means the preview PR was just merged. Determine the bump level from HEAD~1's fragments, tag the release, push the tag.

This is the same file-presence-based detection Changesets uses, so it survives squash, rebase, and merge commits alike.

Status

Early scaffold. Public API and config keys may shift before 1.0.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scriv_release-0.6.2.tar.gz (144.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scriv_release-0.6.2-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file scriv_release-0.6.2.tar.gz.

File metadata

  • Download URL: scriv_release-0.6.2.tar.gz
  • Upload date:
  • Size: 144.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for scriv_release-0.6.2.tar.gz
Algorithm Hash digest
SHA256 cd019f5c29ff4cb91c1d5050a6c17d408b203040fee08b9dd7f47bf51e110927
MD5 33f519e14eeb0c47b4f78fd37d3733e5
BLAKE2b-256 5d69dda559d42dada13590212f7410c8b2e065fb3b0aa8591e3f6f3555d6a50c

See more details on using hashes here.

Provenance

The following attestation bundles were made for scriv_release-0.6.2.tar.gz:

Publisher: publish.yml on whitphx/scriv-release

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scriv_release-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: scriv_release-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for scriv_release-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6604ea51ca581b63f814a23ab3a8b5935072972de4e5d6a1c50e6c27caa0f154
MD5 4a6cce72d682f31468161fec2632f45c
BLAKE2b-256 36a618baa59fd6ec565393c60626adf78b50a7482078c3f95861ab6a499b4f1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for scriv_release-0.6.2-py3-none-any.whl:

Publisher: publish.yml on whitphx/scriv-release

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page