-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (34 loc) · 1017 Bytes
/
publish.yml
File metadata and controls
42 lines (34 loc) · 1017 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
39
40
41
42
name: Publish Python 🐍 distribution 📦 to PyPI on tag
on:
push:
tags:
- '*'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: '3.12'
- name: Install uv and build tools
run: |
pip install uv
uv pip install --system build twine
- name: Install package dependencies
run: |
uv pip install --system .
- name: Test SDK imports
run: |
python -c "import rootly_sdk; print('SDK imports successfully')"
- name: Build package
run: |
python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*