-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (35 loc) · 1.08 KB
/
deploy-pypi.yml
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
name: deploy-pypi
on:
push:
branches:
- main
release:
types:
- published
jobs:
build-and-deploy:
runs-on: ubuntu-latest
name: Publish python distribution to PyPI
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install twine and wheel
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade twine
python -m pip install --upgrade wheel
- name: Build distribution
run: |
python setup.py sdist
python setup.py bdist_wheel
twine check dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: __token__
password: ${{ secrets.pypi_password }}