-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (34 loc) · 913 Bytes
/
deploy.yml
File metadata and controls
43 lines (34 loc) · 913 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
43
name: Deploy Package
on:
push:
tags:
- 'v*' # Trigger on version tags like v1.0.0, v2.1.0, etc.
permissions:
contents: read
id-token: write # Needed for PyPI authentication
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0 # Needed for setuptools-scm to work properly
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip build
- name: Build package
run: python -m build
- name: Verify package
run: |
pip install twine
twine check dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true