Release version 0.23.4, attempt no. 2 #78
Workflow file for this run
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: Release | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- devel | |
jobs: | |
release: | |
if: ${{ github.event.pull_request.merged == true && contains(github.head_ref, 'release') }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- name: Checkout latest version | |
uses: actions/checkout@v3 | |
with: | |
ref: devel | |
- name: Setup Python, Ubuntu and Python environment | |
uses: ./.github/workflows/actions/setup | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Perun (to assure it is correctly installed) and try obtaining the version | |
run: | | |
make install | |
perun --version | |
- name: Set version | |
id: manual-tagger | |
run: echo "NEW_TAG=$(perun --version | cut -d' ' -f2)" >> "$GITHUB_OUTPUT" | |
- name: Tag the new version | |
uses: rickstaa/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.manual-tagger.outputs.NEW_TAG }} | |
build-and-deploy-doc: | |
needs: release | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- name: Checkout latest version | |
uses: actions/checkout@v3 | |
with: | |
ref: devel | |
- name: Setup Python, Ubuntu and Python environment | |
uses: ./.github/workflows/actions/setup | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Generate docs for Python using Tox | |
run: | | |
tox -e docs | |
- name: Deploy to GH pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs/_build/html | |
build-and-deploy-to-pypi: | |
needs: release | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- name: Checkout latest version | |
uses: actions/checkout@v4 | |
with: | |
ref: devel | |
- name: Setup Python, Ubuntu and Python environment | |
uses: ./.github/workflows/actions/setup | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Ensure that dependencies are installed | |
run: | | |
# Install and upgrade pip | |
python3 -m pip install --upgrade pip | |
# Install dependencies for build and deploy | |
python3 -m pip install build wheel twine | |
- name: Build python release distribution package | |
run: | | |
make release | |
- name: Upload to TestPypi | |
run: | | |
python3 -m twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TESTPYPI_SECRET_TOKEN }} | |
TWINE_REPOSITORY: testpypi | |
- name: Upload to Pypi | |
run: | | |
python3 -m twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_SECRET_TOKEN }} |