Skip to content

Update main.yml

Update main.yml #13

name: Publish to PyPI
on: push
jobs:
build:
name: Build and publish Python distributions to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- name: checkout the repo
uses: actions/checkout@master
with:
ref: py3-portx
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
# run: |
# python -m pip install --upgrade pip
# pip install setuptools wheel
# python setup.py sdist bdist_wheel
- name: Publish to Test PyPI
#if: contains(github.ref, "dev") || contains(github.ref, "rc")
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
# - name: Publish to PyPI
# if: startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}