chore(ci): re-enable 3.14 tests #2761
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: build | |
| on: | |
| push: | |
| tags: | |
| - pact-python/* | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| STABLE_PYTHON_VERSION: '39' | |
| HATCH_VERBOSE: '1' | |
| FORCE_COLOR: '1' | |
| CIBW_BUILD_FRONTEND: build | |
| jobs: | |
| complete: | |
| name: Build completion check | |
| if: always() | |
| permissions: | |
| contents: none | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| - publish | |
| steps: | |
| - name: Failed | |
| run: exit 1 | |
| if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | |
| build: | |
| name: Build source distribution and wheel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 | |
| with: | |
| enable-cache: true | |
| - name: Install Python | |
| run: uv python install ${{ env.STABLE_PYTHON_VERSION }} | |
| - name: Install hatch | |
| run: uv tool install hatch | |
| - name: Create source distribution and wheel | |
| run: hatch build | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: wheels-sdist | |
| path: ./dist/*.tar* | |
| if-no-files-found: error | |
| compression-level: 0 | |
| - name: Upload wheel | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: wheels-whl | |
| path: ./dist/*.whl | |
| if-no-files-found: error | |
| compression-level: 0 | |
| publish: | |
| name: Publish wheels and sdist | |
| if: >- | |
| github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/pact-python/') | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/pact-python | |
| needs: | |
| - build | |
| permissions: | |
| # Required for creating the release | |
| contents: write | |
| # Required for trusted publishing | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install git cliff and typos | |
| uses: taiki-e/install-action@61e5998d108b2b55a81b9b386c18bd46e4237e4f # v2.63.1 | |
| with: | |
| tool: git-cliff,typos | |
| - name: Update changelog | |
| run: git cliff --verbose | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Generate release changelog | |
| id: release-changelog | |
| run: | | |
| if ! git cliff \ | |
| --current \ | |
| --strip header \ | |
| --output ${{ runner.temp }}/release-changelog.md; then | |
| { | |
| echo "> [!WARNING]" | |
| echo ">" | |
| echo "> No changelog generated. To be filled in." | |
| } > ${{ runner.temp }}/release-changelog.md | |
| fi | |
| { | |
| echo "" | |
| echo "<details>" | |
| echo "<summary>" | |
| echo "" | |
| echo "## Pull Requests" | |
| echo "" | |
| echo "</summary>" | |
| echo "" | |
| } >> ${{ runner.temp }}/release-changelog.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Download wheels and sdist | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| path: wheelhouse | |
| merge-multiple: true | |
| - name: Generate release | |
| id: release | |
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 | |
| with: | |
| files: wheelhouse/* | |
| body_path: ${{ runner.temp }}/release-changelog.md | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| - name: Push build artifacts to PyPI | |
| uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 | |
| with: | |
| skip-existing: true | |
| packages-dir: wheelhouse | |
| - name: Create PR for changelog update | |
| uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| commit-message: 'docs: update changelog for ${{ github.ref_name }}' | |
| title: 'docs: update changelog' | |
| body: | | |
| This PR updates the changelog for ${{ github.ref_name }}. | |
| branch: docs/update-changelog | |
| base: main |