Skip to content

Commit

Permalink
feat(ci): modernize package build
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jan 21, 2025
1 parent 6747da9 commit 6eda6f2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ on: [push, pull_request]
jobs:
setup:
runs-on: ubuntu-24.04
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-setup-${{ hashFiles('**/requirements*.txt') }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements-test.txt
- uses: astral-sh/setup-uv@v5
- name: build
run: python -m build
run: uv build
- name: twine
run: twine check dist/*
run: uvx twine check dist/*
- name: pydistcheck
run: uvx pydistcheck --inspect dist/*
- name: pyroma
run: uvx pyroma dist/*.tar.gz
- name: check-wheel-contents
run: uvx check-wheel-contents dist/*.whl
# - name: check-manifest
# run: uvx check-manifest -v
- name: Publish package
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
run: uv publish --trusted-publishing always

0 comments on commit 6eda6f2

Please sign in to comment.