code-specialist / pypi-poetry-publish

Opinionated GitHub action to fully automate publishing packages to PyPI - using Poetry and GitHub releases
MIT License
11 stars 4 forks source link

Step git fetch fails #4

Closed Zukunftsmusik closed 1 year ago

Zukunftsmusik commented 1 year ago

When triggering the action, it fails in the step git fetch. Do you have an idea why this happens?

Debug logs from the action

Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 13 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
  The process '/usr/bin/git' failed with exit code 1
  Waiting 15 seconds before trying again
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master*:refs/remotes/origin/master* +refs/tags/master*:refs/tags/master*
  ##[debug]Unsetting HOME override
  ::remove-matcher owner=checkout-git::
  ##[debug]Removed matchers: 'checkout-git'
  Error: The process '/usr/bin/git' failed with exit code 1

This is the yaml file:

name: Publish to PyPI.org
on:
  release:
    types: [published]
jobs:
  pypi:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - name: Publish PyPI package
        uses: code-specialist/pypi-poetry-publish@v1.2
        with:
          ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
Zukunftsmusik commented 1 year ago

Turned out I had to define the input BRANCH, since the repo doesn't have a master branch, but a main branch instead.