Skip to content

Commit

Permalink
release preparation (#134)
Browse files Browse the repository at this point in the history
* added release.yml to automate release to pypi process, fixed long_description type (was causing error)

* added release notes from pymc repo
  • Loading branch information
michaelraczycki authored Apr 3, 2023
1 parent 831a894 commit f554df1
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -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:
- "*"
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f554df1

Please sign in to comment.