Tidying Guzman-Nielan elements (#288) #59
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: 📦 Releases and packaging | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
check-version: | |
name: Check version number | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install PyGitHub | |
run: python3 -m pip install PyGitHub | |
- name: Check version number and make release if necessary | |
run: python .github/scripts/version.py ${{ secrets.GITHUB_TOKEN }} >> $GITHUB_OUTPUT | |
id: version-check | |
- name: Trigger Read the Docs build | |
run: python .github/scripts/trigger_rtd_build.py ${{ secrets.RTDS_TOKEN }} | |
if: steps.version-check.outputs.release != 'no' | |
- name: Prepare release | |
run: python3 prepare_release.py --version ${{ steps.version-check.outputs.release }} | |
- name: Build a wheel for PyPI | |
run: | | |
python3 -m pip install build | |
python3 -m build . | |
if: steps.version-check.outputs.release != 'no' | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: steps.version-check.outputs.release != 'no' |