Bump version to 0.3.3 #9
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: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
name: Build distribution π¦ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
python3-gi \ | |
python3-gi-cairo \ | |
gir1.2-gtk-3.0 \ | |
libcairo2-dev \ | |
pkg-config \ | |
python3-dev \ | |
libgirepository1.0-dev | |
- name: Install build dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build package | |
run: python -m build | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
publish-to-pypi: | |
name: Publish to PyPI π | |
needs: [build] | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
permissions: | |
id-token: write # Required for OIDC | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
github-release: | |
name: Upload to GitHub Release π¦ | |
needs: [publish-to-pypi] | |
# Only run this job when a tag is pushed | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
# Create release first | |
gh release create "${GITHUB_REF#refs/tags/}" \ | |
--repo "${{ github.repository }}" \ | |
--generate-notes | |
# Then upload assets | |
gh release upload "${GITHUB_REF#refs/tags/}" dist/** \ | |
--repo "${{ github.repository }}" | |
publish-docs: | |
name: Publish documentation π | |
needs: [github-release] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
python3-gi \ | |
python3-gi-cairo \ | |
gir1.2-gtk-3.0 \ | |
libcairo2-dev \ | |
pkg-config \ | |
python3-dev \ | |
libgirepository1.0-dev | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[docs] | |
- name: Configure git for docs | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Set release version | |
run: | | |
echo "GIT_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
- name: Build and deploy documentation | |
run: | | |
mike deploy --push --update-aliases ${GIT_TAG} latest |