Skip to content

chore(deps): update ruff to v0.15.7 (#1506) #3038

chore(deps): update ruff to v0.15.7 (#1506)

chore(deps): update ruff to v0.15.7 (#1506) #3038

Workflow file for this run

---
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: '310'
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
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@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: wheels-sdist
path: ./dist/*.tar*
if-no-files-found: error
compression-level: 0
- name: Upload wheel
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install git cliff and typos
uses: taiki-e/install-action@94a7388bec5d4c8dd93e3ebf09e0ff448f3f6f4d # v2.68.35
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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: wheelhouse
merge-multiple: true
- name: Generate release
id: release
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
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@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.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