PyPI test check (#1296)
* Adding Travis-CI cmake static * adding pypi test
This commit is contained in:
33
.github/workflows/python-publish.yml
vendored
33
.github/workflows/python-publish.yml
vendored
@ -3,7 +3,7 @@ name: PyPI 📦 Distribution
|
|||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -48,13 +48,28 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: unicorn-packages-${{ matrix.os }}-${{ matrix.platform }}
|
|
||||||
path: ${{ github.workspace }}/bindings/python/dist/*
|
path: ${{ github.workspace }}/bindings/python/dist/*
|
||||||
|
|
||||||
- name: Publish distribution 📦 to PyPI
|
publish:
|
||||||
if: startsWith(github.event.ref, 'refs/tags')
|
needs: [build]
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
runs-on: ubuntu-latest
|
||||||
with:
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
user: __token__
|
steps:
|
||||||
password: ${{ secrets.pypi_pass }}
|
- uses: actions/download-artifact@v2
|
||||||
packages_dir: ${{ github.workspace }}/bindings/python/dist/
|
with:
|
||||||
|
name: artifact
|
||||||
|
path: dist
|
||||||
|
|
||||||
|
- name: Publish distribution 📦 to test PyPI
|
||||||
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.testpypi_pass }}
|
||||||
|
repository_url: https://test.pypi.org/legacy/
|
||||||
|
|
||||||
|
- name: Publish distribution 📦 to PyPI
|
||||||
|
if: ${{ success() }}
|
||||||
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.pypi_pass }}
|
||||||
|
Reference in New Issue
Block a user