name: Release Python packages on: push: branches: - main paths: - ".github/release-please/**" - ".github/workflows/release-python.yml" - "python-packages/**" workflow_dispatch: permissions: contents: write pull-requests: write id-token: write jobs: scaffold-only: if: ${{ hashFiles('python-packages/**/pyproject.toml') == '' }} runs-on: ubuntu-latest steps: - run: echo "No Python package exists yet. release-please remains scaffold-only." release: if: ${{ hashFiles('python-packages/**/pyproject.toml') != '' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - id: release uses: googleapis/release-please-action@v4 with: config-file: .github/release-please/python-config.json manifest-file: .github/release-please/python-manifest.json - name: Reminder if: ${{ steps.release.outputs.releases_created == 'true' }} run: | echo "Python package release metadata was created." echo "Wire package-specific build/publish steps here when the first python package is added."