-
Notifications
You must be signed in to change notification settings - Fork 63
38 lines (32 loc) · 957 Bytes
/
python-publish.yml
File metadata and controls
38 lines (32 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python Package
on:
release:
types: [published]
workflow_dispatch: {}
jobs:
publish:
strategy:
matrix:
python-version: [3.9]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.25"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync
- name: Publish package
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
uv build
uv publish