Update astral-sh/setup-uv action to v6.3.1 #221
Workflow file for this run
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: CD | |
| on: | |
| push: | |
| tags: v* | |
| pull_request: | |
| paths: | |
| - .github/workflows/cd.yml | |
| - README.md | |
| - ./**/pyproject.toml | |
| - ./**/conftest.py | |
| jobs: | |
| pre-publish-checks: | |
| runs-on: ubuntu-latest | |
| name: pre-publication checks | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1 | |
| with: | |
| enable-cache: false | |
| - run: uv run scripts/pre_publish_checks.py | |
| build: | |
| name: Build artifacts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1 | |
| with: | |
| enable-cache: true | |
| cache-suffix: build | |
| - name: Build distributions | |
| shell: bash -l {0} | |
| run: uv build --package inifix | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: artifacts | |
| path: dist | |
| test-sdist: | |
| name: Test source distribution | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1 | |
| with: | |
| python-version: '3.10' | |
| enable-cache: true | |
| prune-cache: false | |
| cache-suffix: test-sdist | |
| - run: uv sync --only-group test | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: artifacts | |
| path: dist | |
| - name: test source distribution in isolation | |
| run: | | |
| tar xzf dist/*.tar.gz | |
| cd inifix-* | |
| uv pip install . | |
| uv run --no-project pytest --color=yes -ra | |
| pypi-publish: | |
| name: Publish | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| needs: [pre-publish-checks, test-sdist] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/inifix | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: artifacts | |
| path: dist | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 |