Skip to content

Bump version to 2.2.12 #17

Bump version to 2.2.12

Bump version to 2.2.12 #17

Workflow file for this run

name: PyPI release 🐍 📦
on:
push:
tags: [v*]
jobs:
build:
name: Build package 📦
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Set up Python 🐍
with:
python-version: '3.11'
- name: Check version 🔍
run: python .github/utils/check_version.py "${GITHUB_REF#refs/tags/v}"
- name: Install build deps 🔧
run: pip install --user build
- name: Build wheel and sdist 📦
run: >-
python -m
build
--outdir dist/
.
- uses: actions/upload-artifact@v4
name: Upload build artifacts 📦
with:
name: wheel
retention-days: 7
path: ./dist
create-github-release:
name: Create GitHub release 🐙
# Upload wheel to a GitHub release. It remains available as a build artifact for a while as well.
needs: build
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
name: Download build artifacts 📦
- name: Create draft release 🐙
run: >-
gh release create
--draft
--repo ${{ github.repository }}
--title ${{ github.ref_name }}
${{ github.ref_name }}
wheel/*
env:
GH_TOKEN: ${{ github.token }}
publish-pypi:
name: Publish 🚀
needs: build
# Wait for approval before attempting to upload to PyPI. This allows reviewing the
# files in the draft release.
environment: publish
runs-on: ubuntu-22.04
permissions:
contents: write
id-token: write
steps:
- uses: actions/download-artifact@v4
# Try uploading to Test PyPI first, in case something fails.
- name: Publish to Test PyPI 🧪
uses: pypa/gh-action-pypi-publish@v1.12.2
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: wheel/
- name: Publish to PyPI 🚀
uses: pypa/gh-action-pypi-publish@v1.12.2
with:
packages-dir: wheel/
- name: Publish GitHub release 🐙
run: >-
gh release edit
--draft=false
--repo ${{ github.repository }}
${{ github.ref_name }}
env:
GH_TOKEN: ${{ github.token }}