diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..10d99b3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,71 @@ +name: Release + +# Publish to PyPI when a v* tag is pushed. The tag is the trigger, so a release +# is `git tag vX.Y.Z && git push --tags` and nothing else — no token lives here. +# Uploads go through PyPI Trusted Publishing (OIDC): PyPI is configured to trust +# this repository's `pypi` environment, and the `publish` job mints a short-lived +# credential per run. There is no API token to leak from a public repo. +# +# One-time setup on PyPI (Trusted Publisher, "pending" until the first release): +# https://pypi.org/manage/account/publishing/ +# PyPI project name: samplerdisc +# Owner: bmxcode +# Repository: samplerdisc +# Workflow name: release.yml +# Environment: pypi +# and create a repository environment named `pypi` (Settings -> Environments), +# optionally restricted to tags matching v*. + +on: + push: + tags: ["v*"] + +permissions: {} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + + # The tag is the version, and a tag that disagrees with pyproject would + # publish the wrong number under the right name. Fail loud instead — the + # same "enforced, not remembered" reflex as the no-media check in ci.yml. + - name: Tag matches project version + run: | + tag="${GITHUB_REF_NAME#v}" + proj="$(uv version --short)" + if [ "$tag" != "$proj" ]; then + echo "::error::tag v$tag != pyproject version $proj" + exit 1 + fi + echo "v$tag matches pyproject" + + - name: Build sdist and wheel + run: uv build + + - name: Check metadata renders + run: uvx twine check dist/* + + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish: + needs: build + runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write # OIDC token for Trusted Publishing; nothing else + steps: + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index aef365d..0e234d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ Notable changes to `samplerdisc`. Format-level findings live in [docs/formats/](docs/formats/); decisions and their rejected alternatives live in [docs/adr/](docs/adr/). This file records what changed for someone using the tool. +## 0.5.1 — 2026-09-05 + +### Added + +- **`samplerdisc` is now on PyPI.** Install it with `uv tool install samplerdisc`, run it once with `uvx samplerdisc`, or reach for `pipx`/`pip` — no `git+` URL and no clone. Releases publish automatically when a `vX.Y.Z` tag is pushed, through PyPI Trusted Publishing (OIDC), so no API token is stored in the repository; a guard fails the release if the tag disagrees with the packaged version. The tool itself is unchanged — this is distribution only, and installing from `main` still works for the unreleased edge. ([README.md](README.md#install), [.github/workflows/release.yml](.github/workflows/release.yml)) + ## 0.5.0 — 2026-09-05 ### Fixed diff --git a/README.md b/README.md index 3e80160..9b9b136 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # samplerdisc [![CI](https://github.com/bmxcode/samplerdisc/actions/workflows/ci.yml/badge.svg)](https://github.com/bmxcode/samplerdisc/actions/workflows/ci.yml) +[![PyPI](https://img.shields.io/pypi/v/samplerdisc)](https://pypi.org/project/samplerdisc/) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) ![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue) @@ -15,13 +16,26 @@ Thousands of 1990s sample libraries survive only as disc images built for hardwa Python 3.11 or newer. No other dependencies — the whole tool is standard library. ```bash -uv tool install git+https://github.com/bmxcode/samplerdisc +uv tool install samplerdisc +``` + +Or run it once without installing: + +```bash +uvx samplerdisc --help ``` -Or with pip: +Or with pip / pipx: ```bash -pip install git+https://github.com/bmxcode/samplerdisc +pipx install samplerdisc # isolated, on your PATH +pip install samplerdisc # into the current environment +``` + +To install the unreleased `main`: + +```bash +uv tool install git+https://github.com/bmxcode/samplerdisc ``` ## Use diff --git a/pyproject.toml b/pyproject.toml index cf6cda0..d86600b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "samplerdisc" -version = "0.5.0" +version = "0.5.1" description = "Convert vintage sampler CD-ROM images (AKAI, E-mu, Roland) to uncompressed WAV" readme = "README.md" license = "MIT" diff --git a/uv.lock b/uv.lock index 8c8818f..846504c 100644 --- a/uv.lock +++ b/uv.lock @@ -90,7 +90,7 @@ wheels = [ [[package]] name = "samplerdisc" -version = "0.5.0" +version = "0.5.1" source = { editable = "." } [package.dev-dependencies]