Skip to content

chore: bump to v0.4.32 #11

chore: bump to v0.4.32

chore: bump to v0.4.32 #11

name: Build and publish CPU 🐍📦 to PyPI
on:
push:
tags:
- 'v*'
jobs:
build-n-publish:
if: startsWith(github.ref, 'refs/tags/')
name: Build and publish CPU 🐍📦 to PyPI
runs-on: ubuntu-latest
environment:
name: pypi-cpu
url: https://pypi.org/p/anylabeling
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python -m pip install build==1.2.2 twine==6.1.0 --user
- name: Set preferred device to CPU
run: >-
sed -i'' -e 's/\_\_preferred_device\_\_[ ]*=[ ]*\"[A-Za-z0-9]*\"/__preferred_device__ = "CPU"/g' anylabeling/app_info.py
- name: Build a binary wheel and a source tarball
run: >-
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true