# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Publish Python distributions to PyPI on: push: tags: - "v*.*.*" # Don't trigger if it's just a documentation update paths-ignore: - '**.md' - '**.MD' - '**.yml' - '**.sh' - 'docs/**' - 'Dockerfile' - 'LICENSE' - '.gitattributes' - '.gitignore' - '.dockerignore' jobs: release: if: github.repository == 'ciromattia/kcc' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.11 cache: 'pip' - name: Install python dependencies run: | python -m pip install --upgrade pip setuptools wheel pyinstaller pip install -r requirements.txt - name: Build Dist run: | python setup.py sdist - name: Publish a Python distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }}