2021-09-26 17:56:40 +00:00
|
|
|
name: Publish packages
|
|
|
|
on:
|
2022-01-14 15:32:48 +00:00
|
|
|
release:
|
|
|
|
types: [published]
|
2021-09-26 17:56:40 +00:00
|
|
|
|
2024-09-06 14:48:43 +00:00
|
|
|
env:
|
|
|
|
UV_VERSION: 0.4.5
|
|
|
|
|
2021-09-26 17:56:40 +00:00
|
|
|
jobs:
|
|
|
|
build-n-publish:
|
|
|
|
name: Build release packages
|
|
|
|
runs-on: ubuntu-latest
|
2023-10-29 15:30:37 +00:00
|
|
|
permissions: # for trusted publishing
|
|
|
|
id-token: write
|
2021-09-26 17:56:40 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Setup python
|
2023-10-29 15:30:37 +00:00
|
|
|
uses: actions/setup-python@v4
|
2021-09-26 17:56:40 +00:00
|
|
|
with:
|
2023-10-29 15:30:37 +00:00
|
|
|
python-version: "3.x"
|
2021-09-26 17:56:40 +00:00
|
|
|
|
2024-09-06 14:48:43 +00:00
|
|
|
- name: Install uv
|
|
|
|
run: |-
|
|
|
|
pipx install uv==${{ env.UV_VERSION }} --python "${{ steps.setup-python.outputs.python-path }}"
|
2021-09-26 17:56:40 +00:00
|
|
|
- name: Build a binary wheel and a source tarball
|
2024-09-06 14:48:43 +00:00
|
|
|
run: uv build
|
2021-09-26 17:56:40 +00:00
|
|
|
- name: Publish release on pypi
|
2023-10-29 15:30:37 +00:00
|
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|