Skip to content

chore: Release v0.34.1 (#2120) #49

chore: Release v0.34.1 (#2120)

chore: Release v0.34.1 (#2120) #49

Workflow file for this run

name: Release
on:
push:
tags:
- v*
permissions:
contents: write # Needed to upload artifacts to the release
id-token: write # Needed for OIDC PyPI publishing
jobs:
release:
name: Publish to PyPI
runs-on: ubuntu-latest
environment: publishing
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.11"
- name: Upgrade pip
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pip install pip
pip --version
- name: Install Poetry
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install poetry
poetry --version
- name: Check version
run: |
version=$(poetry version | awk '{print $2}')
tag=$(echo "${{ github.ref }}" | awk '{split($0,p,"/"); print p[3]}')
if [ "v$version" != $tag ]; then echo "Release tag and package version do not match!"; exit 1; fi;
- name: Build
run: poetry build
- name: Upload wheel to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.whl
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Publish
uses: pypa/[email protected]