Fixed an issue where the poetry-dynamic-versioning-plugin was not used in

release artifacts.

Also adds a test_release workflow which allows to create the release
distribution.
This commit is contained in:
Sebastian Mohr 2025-10-13 17:10:38 +02:00 committed by Šarūnas Nejus
parent 77842b72d7
commit d01f960e4f
3 changed files with 46 additions and 6 deletions

43
.github/workflows/test_release.yaml vendored Normal file
View file

@ -0,0 +1,43 @@
name: Make a Beets Release artifacts
on:
workflow_dispatch:
inputs:
version:
description: 'Version of the new release, just as a number with no prepended "v"'
required: true
env:
PYTHON_VERSION: 3.9
NEW_VERSION: ${{ inputs.version }}
NEW_TAG: v${{ inputs.version }}
jobs:
increment-version:
name: Bump version, commit and create tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python tools
uses: BrandonLWhite/pipx-install-action@v1.0.3
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry
- name: Install dependencies
run: poetry install --with=release --extras=docs
- name: Bump project version
run: poe bump "${{ env.NEW_VERSION }}"
- name: Build a binary wheel and a source tarball
run: poe build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-test
path: dist/

View file

@ -170,10 +170,6 @@ Other changes:
UpdateVersionCallable = Callable[[str, Version], str]
FILENAME_AND_UPDATE_TEXT: list[tuple[Path, UpdateVersionCallable]] = [
(
PYPROJECT,
lambda text, new: re.sub(r"(?<=\nversion = )[^\n]+", f'"{new}"', text),
),
(CHANGELOG, update_changelog),
(BASE / "docs" / "conf.py", update_docs_config),
]

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "beets"
version = "2.5.0"
version = "0.0.0"
description = "music tagger and library organizer"
authors = ["Adrian Sampson <adrian@radbox.org>"]
maintainers = ["Serene-Arc"]
@ -36,6 +36,7 @@ include = [ # extra files to include in the sdist
]
exclude = ["docs/_build", "docs/modd.conf", "docs/**/*.css"]
[tool.poetry.urls]
Changelog = "https://github.com/beetbox/beets/blob/master/docs/changelog.rst"
"Bug Tracker" = "https://github.com/beetbox/beets/issues"
@ -173,7 +174,7 @@ build-backend = "poetry_dynamic_versioning.backend"
[tool.pipx-install]
poethepoet = ">=0.26"
poetry = ">=1.8,<2"
poetry = { version = ">=1.8,<2", inject = {"poetry-dynamic-versioning[plugin]" = ">=1.9.1" }}
[tool.poe.tasks.build]
help = "Build the package"