-
Notifications
You must be signed in to change notification settings - Fork 862
62 lines (52 loc) · 1.57 KB
/
publish-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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
on:
workflow_dispatch:
inputs:
publish_version:
required: true
type: string
jobs:
log-the-inputs:
runs-on: ubuntu-latest
steps:
- run: |
echo "target version: ${{ github.event.inputs.publish_version }}"
env:
VERSION: ${{ github.event.inputs.publish_version }}
upload-to-pypi:
name: Publish to PyPI test site
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
id: github_context_step
run: |
echo '${{ toJSON(github) }}'
echo "target version: ${{ github.event.inputs.publish_version }}"
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build wheel
--user
- name: Build a binary wheel and a source tarball
run: |
echo `pwd`
python setup.py -q sdist bdist_wheel --universal
- name: Install tensorboardX from whl
run: pip install dist/tensorboardX*.whl
- name: Print version
run: python -c "import tensorboardX; print(tensorboardX.__version__)"
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TESTSITE }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API }}
repository_url: https://upload.pypi.org/legacy/