Skip to content

Commit

Permalink
Add an Actions workflow for PyPi and set dependency_links for pymc3
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard committed Dec 9, 2020
1 parent b9ba712 commit dc92615
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: PyPI
on:
push:
branches:
- master
- auto-release
pull_request:
branches: [master]
release:
types: [published]

jobs:
build:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Build the sdist
run: |
python setup.py sdist
- name: Check that the sdist build installs
run: |
mkdir -p test-sdist
cd test-sdist
python -m venv venv-sdist
venv-sdist/bin/python -m pip install ../dist/pymc3-hmm-*
- uses: actions/upload-artifact@v2
with:
name: artifact
path: dist/*

upload_pypi:
name: Upload to PyPI on release
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_secret }}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
zip_safe=False,
python_requires=">=3.6",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
Expand Down

0 comments on commit dc92615

Please sign in to comment.