Skip to content

Bump version to v2.2.9 #14

Bump version to v2.2.9

Bump version to v2.2.9 #14

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@v4
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
--sdist
--wheel
--outdir dist/
.
- uses: actions/upload-artifact@v3
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@v3
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@v3
# Try uploading to Test PyPI first, in case something fails.
- name: Publish to Test PyPI 🧪
uses: pypa/[email protected]
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: wheel/
- name: Publish to PyPI 🚀
uses: pypa/[email protected]
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 }}