Skip to content

Release 0.4.0

Release 0.4.0 #12

name: Post-Release Version Bump
on:
release:
types:
- published
jobs:
post_release_version_bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Derive versions
id: versions
run: |
old_version=`grep -oP '(?<=__version__ = ").*(?=")' xanadu_sphinx_theme/_version.py`
new_version=`echo $old_version | awk '{split($0,v,"."); print v[1] "." v[2]+1 ".0-dev"}'`
echo "old_version=$old_version" >> $GITHUB_OUTPUT
echo "new_version=$new_version" >> $GITHUB_OUTPUT
- name: Bump version in _version.py
run:
sed -i 's/${{ steps.versions.outputs.old_version }}/${{ steps.versions.outputs.new_version }}/' xanadu_sphinx_theme/_version.py
- name: Bump version in changelog
run: |
next_release_version=${{ steps.versions.outputs.new_version }}
next_release_version=${next_release_version%-dev}
header="## Release ${next_release_version} (development release)
### Contributors
This release contains contributions from (in alphabetical order):
"
printf '%s\n%s\n' "$header" "$(cat .github/CHANGELOG.md)" > .github/CHANGELOG.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
base: master
title: Post-release version bump to `${{ steps.versions.outputs.new_version }}`
body: >
This PR bumps the XST version from `${{ steps.versions.outputs.old_version }}`
to `${{ steps.versions.outputs.new_version }}`.
commit-message: Bump version to `${{ steps.versions.outputs.new_version }}`
branch: post-release-version-bump
reviewers: mandrenkov, josh146