Release version 0.21.6 #10
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 | |
steps: | |
- name: Checkout latest version | |
uses: actions/checkout@v3 | |
with: | |
ref: devel | |
- name: Set version | |
id: manual-tagger | |
run: echo "NEW_TAG=$(perun --version | cut -d' ' -f2)" >> "$GITHUB_OUTPUT" | |
- name: Tag the new version | |
uses: phish108/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
release-branch: devel | |
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@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: 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 setuptools wheel twine | |
- name: Build python release distribution package | |
run: | | |
pip3 install -q build | |
make pypi-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 }} |