-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1002 Bytes
/
prerelease.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
42
43
44
45
46
name: TestPyPI
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: 'https://test.pypi.org/legacy/'
jobs:
build-and-publish:
name: Build and publish to TestPyPI
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install twine
run: |
pip install --upgrade pip wheel setuptools
pip install twine
python --version
pip --version
twine --version
- name: Create source distribution
run: |
python setup.py sdist --dist-dir wheelhouse
- name: Upload source distribution
run: |
twine upload --skip-existing wheelhouse/*.tar.gz