Skip to content

.github/workflows/publish-pypi.yml #16

.github/workflows/publish-pypi.yml

.github/workflows/publish-pypi.yml #16

Workflow file for this run

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/