diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..1efe251d --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,24 @@ +# This file contains configuration for the automatic generation of release notes in GitHub. +# It's not perfect, but it makes it a little less laborious to write informative release notes. +# Also see https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes +changelog: + exclude: + labels: + - no releasenotes + categories: + - title: Major Changes 🛠 + labels: + - major + - title: New Features 🎉 + labels: + - enhancements + - feature request + - title: Bugfixes 🪲 + labels: + - bug + - title: Documentation 📖 + labels: + - docs + - title: Maintenance 🔧 + labels: + - "*" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..6d175e82 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: release-pipeline + +on: + release: + types: + - created + +jobs: + release-job: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.7 + - name: Install release tools + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build distribution package + run: python setup.py sdist bdist_wheel + - name: Check version number match + run: | + echo "GITHUB_REF: ${GITHUB_REF}" + # The GITHUB_REF should be something like "refs/tags/v1.2.3" + # Make sure the package version is the same as the tag + grep -Rq "^Version: ${GITHUB_REF:11}$" pymc.egg-info/PKG-INFO + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN_PYMC }} + run: | + twine check dist/* + twine upload --repository pypi --username __token__ --password ${PYPI_TOKEN} dist/* + test-install-job: + needs: release-job + runs-on: ubuntu-latest + steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.7 + - name: Give PyPI a chance to update the index + run: sleep 240 + - name: Install from PyPI + run: | + pip install pymc-experimental==${GITHUB_REF:11} diff --git a/setup.py b/setup.py index c2c71d21..f44d4345 100644 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def get_version(): license=LICENSE, url=URL, long_description=LONG_DESCRIPTION, - long_description_content_type="text/x-rst", + long_description_content_type="text/markdown", packages=find_packages(), # because of an upload-size limit by PyPI, we're temporarily removing docs from the tarball. # Also see MANIFEST.in