python-kasa/.github/workflows/publish.yml
Steven B. 038b6993ca
Speed up and simplify github workflows (#1128)
- Enable parallel tests in the CI with pytest-xdist
- Migrate to the official `astral-sh/setup-uv` github action
- Call `pre-commit` run as a single job in CI instead of relisting each
check
- Use `uv` version 0.4.16
- Fix bug with pre-commit cache
- Update `publish.yml` to use  `astral-sh/setup-uv`
2024-09-27 10:27:53 +01:00

34 lines
685 B
YAML

name: Publish packages
on:
release:
types: [published]
env:
UV_VERSION: 0.4.16
PYTHON_VERSION: 3.12
jobs:
build-n-publish:
name: Build release packages
runs-on: ubuntu-latest
permissions: # for trusted publishing
id-token: write
steps:
- name: Checkout source files
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Build a binary wheel and a source tarball
run: uv build
- name: Publish release on pypi
uses: pypa/gh-action-pypi-publish@release/v1