-
-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (39 loc) · 1.25 KB
/
test-pypi-release.yaml
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
name: test-pypi-release
on:
workflow_dispatch:
inputs:
ref:
description: "ref"
required: true
jobs:
deploy:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.13"]
os: [ubuntu-latest]
steps:
- name: Checkout 🔔
uses: actions/checkout@v4
with:
fetch-depth: 0 # <= https://github.com/actions/checkout/issues/265
- run: git checkout ${{ github.event.inputs.ref }}
if: ${{ github.event.inputs.ref != '' }}
- name: Setup Python ${{ matrix.python-version }} 🔧
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Python Install dependencies 🧹
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Test build and publish 🎁
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_REPOSITORY_URL: "https://test.pypi.org/legacy/"
run: |
python setup.py sdist bdist_wheel
twine upload --repository pypitest dist/*