Repository navigation
79 lines (68 loc) · 2.17 KB
/
Copy pathpublish.yml
File metadata and controls
79 lines (68 loc) · 2.17 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Publish to PyPI
on:
workflow_dispatch:
release:
types: [published]
jobs:
verify:
name: Verify release source
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out source
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
- name: Install package and development tools
run: |
python -m pip install --disable-pip-version-check \
pytest==9.1.1 pytest-asyncio==1.4.0 ruff==0.16.8
python -m pip install --disable-pip-version-check --editable ".[example]"
- name: Verify source
run: |
ruff check .
ruff format --check .
pytest
build:
name: Build distributions
needs: verify
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out source
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
- name: Build wheel and source distribution
run: |
python -m pip install --disable-pip-version-check build==1.6.1
python -m build
- name: Upload distributions
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: python-package-distributions
path: dist/
if-no-files-found: error
publish:
name: Publish distributions
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pipecat-memcode
permissions:
id-token: write
steps:
- name: Download distributions
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: python-package-distributions
path: dist/
- name: Publish distributions to PyPI
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2