Skip to content

Commit 2469ce5

Browse files
Add release pipeline GitHub Action (#3954)
* add long description content type * bump to 3.9.0 * add GitHub release pipeline definition * be conservative while waiting for PyPI * address TODOs to make merge-ready
1 parent 8274b91 commit 2469ce5

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: release-pipeline
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
release-job:
10+
runs-on: ubuntu-latest
11+
env:
12+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: 3.7
19+
# TODO: ideally, this pipeline should run parallelized tests in upstream jobs..
20+
#- name: Install test tooling
21+
# run: |
22+
# pip install pytest pytest-cov nose nose-parameterized
23+
# pip install -r requirements.txt
24+
#- name: Run tests
25+
# run: |
26+
# pytest --cov=./pymc3 --cov-report term-missing pymc3/
27+
- name: Install release tooling
28+
run: |
29+
pip install twine wheel
30+
- name: Build package
31+
run: |
32+
python setup.py sdist bdist_wheel
33+
- name: Check version number match
34+
run: |
35+
echo "GITHUB_REF: ${GITHUB_REF}"
36+
# The GITHUB_REF should be something like "refs/tags/v3.x.x"
37+
# Make sure the package version is the same as the tag
38+
grep -Rq "^Version: ${GITHUB_REF:11}$" pymc3.egg-info/PKG-INFO
39+
- name: Publish to PyPI
40+
run: |
41+
twine check dist/*
42+
twine upload --repository pypi --username __token__ --password ${PYPI_TOKEN} dist/*
43+
test-install-job:
44+
needs: release-job
45+
runs-on: ubuntu-latest
46+
- name: Set up Python
47+
uses: actions/setup-python@v1
48+
with:
49+
python-version: 3.7
50+
- name: Give PyPI a chance to update the index
51+
run: sleep 240
52+
- name: Install from PyPI
53+
run: |
54+
pip install pymc3==${GITHUB_REF:11}

pymc3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# pylint: disable=wildcard-import
16-
__version__ = "3.8"
16+
__version__ = "3.9.0"
1717

1818
import logging
1919
import multiprocessing as mp

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def get_version():
6969
license=LICENSE,
7070
url=URL,
7171
long_description=LONG_DESCRIPTION,
72+
long_description_content_type='text/x-rst',
7273
packages=find_packages(),
7374
package_data={'docs': ['*']},
7475
include_package_data=True,

0 commit comments

Comments
 (0)