-
Notifications
You must be signed in to change notification settings - Fork 179
32 lines (30 loc) · 977 Bytes
/
publish-pypi.yml
File metadata and controls
32 lines (30 loc) · 977 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
name: Publish to PyPi
on:
workflow_dispatch:
push:
branches: development, main
jobs:
build-n-publish:
name: Build dist files for PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.13
- name: Build dist files
run: >
python -m pip install --upgrade pip && pip install -e .[build] &&
python setup.py build &&
python setup.py sdist --formats=gztar
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2
with:
password: ${{ secrets.PYPI_API_TOKEN }}