diff --git a/.github/workflows/test_release.yaml b/.github/workflows/test_release.yaml new file mode 100644 index 000000000..fd1c79c03 --- /dev/null +++ b/.github/workflows/test_release.yaml @@ -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/ diff --git a/extra/release.py b/extra/release.py index b47de8966..650c2c40b 100755 --- a/extra/release.py +++ b/extra/release.py @@ -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), ] diff --git a/pyproject.toml b/pyproject.toml index 3a355418c..b21d0d17a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] 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"