Release 1.1.1 - 2nd attempt (#54) #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package | |
on: | |
# Run on pushes to `main` branch that modify the bump2version file where | |
# version is stored | |
push: | |
branches: | |
- main | |
paths: | |
- '.bumpversion.cfg' | |
# Allows running this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build package | |
run: python -m build -s -w | |
- name: Publish package to PyPi | |
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
- name: Fetch current version | |
run: | | |
VER=$(awk '/^current_version/{print $NF}' .bumpversion.cfg) | |
echo "VERSION=$VER" >> $GITHUB_ENV | |
- name: Build Release Notes from Changelog | |
run: python .github/scripts/generate_rn.py | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Version ${{ env.VERSION }} | |
tag_name: v${{ env.VERSION }} | |
body_path: release_notes.md |