-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.31 KB
/
Copy pathupload_pip_test.yml
File metadata and controls
50 lines (42 loc) · 1.31 KB
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
47
48
49
50
name: Upload to PIP (test.pypi.org)
on:
workflow_call:
secrets:
PYPI_USERNAME_TOKEN_TEST:
required: true
PYPI_PASSWORD_TOKEN_TEST:
required: true
PYPI_URL_TEST:
required: true
workflow_dispatch:
jobs:
upload_to_test:
name: "test.pypi.org"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'false'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: x64
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Copy whl files into dist folder
run: |
python util_funcs.py --func=copyfiles --pat=artifacts/**/*.whl --dest_to=dist
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U twine
- name: Publish package to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME_TOKEN_TEST }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD_TOKEN_TEST }}
run: |
twine upload --skip-existing --non-interactive --verbose --repository-url ${{ secrets.PYPI_URL_TEST }} dist/*
# twine upload --skip-existing --non-interactive --verbose --repository-url https://test.pypi.org/legacy/ dist/*