JRubics / poetry-publish

An action to build and publish python package to pypi (https://pypi.org/) using poetry (https://github.com/sdispater/poetry)
BSD 3-Clause "New" or "Revised" License
129 stars 17 forks source link

Build with poetry-dynamic-versioning-plugin failure #41

Closed NickSebClark closed 9 months ago

NickSebClark commented 10 months ago

Hello trying this out but running into a problem.

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Build and publish to pypi
        uses: JRubics/poetry-publish@v1.17
        with:
          pypi_token: ${{ secrets.PYPI_TOKEN }}
          plugins: "poetry-dynamic-versioning-plugin"

Is what my yaml looks like but i get this:

Using version ^0.4.0 for poetry-dynamic-versioning-plugin

Updating dependencies
Resolving dependencies...

Package operations: 4 installs, 0 updates, 0 removals

  • Installing markupsafe (2.1.3)
  • Installing dunamai (1.18.0)
  • Installing jinja2 (3.1.2)
  • Installing poetry-dynamic-versioning-plugin (0.4.0)

Writing lock file

No module named 'poetry.core.semver'

Any ideas?

natekspencer commented 10 months ago

I'm getting this error too

natekspencer commented 10 months ago

Looks like the issue is with poetry-core version 1.7 which removed poetry-core-semver. See the plugin for updates that resolve this: https://github.com/mtkennerly/poetry-dynamic-versioning/releases/tag/v1.0.1

natekspencer commented 10 months ago

@NickSebClark I was able to publish by forcing the poetry version via:

        with:
          poetry_version: "==1.5.1"
JRubics commented 10 months ago

@natekspencer Thank you for helping out! :hugs:

BrianPugh commented 9 months ago

@NickSebClark @natekspencer poetry-dynamic-versioning-plugin is super old, which is why you are getting this error. What you actually want is poetry-dynamic-versioning[plugin].

From the readme:

If you've previously installed the deprecated poetry-dynamic-versioning-plugin package, be sure to uninstall it before proceeding.

natekspencer commented 9 months ago

@NickSebClark @natekspencer poetry-dynamic-versioning-plugin is super old, which is why you are getting this error. What you actually want is poetry-dynamic-versioning[plugin].

From the readme:

If you've previously installed the deprecated poetry-dynamic-versioning-plugin package, be sure to uninstall it before proceeding.

Ahh, ok. It's the README of this repo that is causing the confusion. It still references poetry-dynamic-versioning-plugin rather than poetry-dynamic-versioning[plugin].

JRubics commented 9 months ago

Updating it, thank you :pray: