-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (36 loc) · 1.11 KB
/
publish-to-test-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
42
43
name: Publish 📦 to TestPyPI
on: [workflow_call, workflow_dispatch]
jobs:
publish-to-test-pypi:
name: Publish to TestPyPI
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: '3.10'
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Cache
id: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install requirements
if: steps.cache-pip.outputs.cache-hit != 'true'
run: |
python -m pip install -r requirements-dev.txt
- name: Publish distribution 📦 to Test PyPI
uses: casperdcl/deploy-pypi@v2
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
pip: wheel -w dist/ --no-deps .
url: https://test.pypi.org/legacy/