bakdata / ci-templates

Collection of reusable workflows and composite actions for Github
MIT License
4 stars 1 forks source link

Consecutive publishing to (Test)PyPI fails #18

Closed disrupted closed 1 year ago

disrupted commented 2 years ago

When using two consecutive publish actions like this

- name: Release to TestPyPI
  uses: bakdata/ci-templates/actions/python-poetry-release@v1.0.0
  with:
    python-version: ${{ env.python-version }}
    working-directory: ${{ env.BACKEND_DIR }}
    pypi-token: ${{ secrets.test-pypi-token }}
    publish-to-test: "true"

- name: Release to PyPI
  uses: bakdata/ci-templates/actions/python-poetry-release@v1.0.0
  with:
    python-version: ${{ env.python-version }}
    working-directory: ${{ env.BACKEND_DIR }}
    pypi-token: ${{ secrets.pypi-token }}
    publish-to-test: "false"

https://github.com/bakdata/streams-explorer/blob/079ab9e23f057dc5e01d91c1aba331c73954c922/.github/workflows/publish.yml

the second publish action fails with the following error:

Cache not found for input keys: venv-Linux-3-9-12-final-0-

Run poetry install --no-dev --no-interaction
Installing dependencies from lock file
No dependencies to install or update

Installing the current project: streams-explorer (1.6.1)
Run # first build the project then publish to PyPI

  RuntimeError

  Aborted

  at /opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/clikit/ui/components/question.py:263 in _read_from_input
      259│         """
      260│         ret = io.read_line(4096)
      261│ 
      262│         if not ret:
    → 263│             raise RuntimeError("Aborted")
      264│ 
      265│         return decode(ret.strip())
      266│ 
      267│     def _has_stty_available(self):

There are 2 files ready for publishing. Build anyway? (yes/no) [no] 
Process completed with exit code 1.
disrupted commented 1 year ago

should be fixed by recent restructuring of the Poetry publish action