Skip to content

Release on PyPI

Release on PyPI #52

Workflow file for this run

name: Release on PyPI
on:
push:
tags:
- "v*"
branches:
- cmeel
pull_request_target:
branches:
- cmeel
env:
CMEEL_LOG_LEVEL: DEBUG
jobs:
wheel:
name: "${{ matrix.build }} ${{ matrix.os }} ${{ matrix.arch }}"
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: ["ubuntu", "macos"]
arch: ["x86_64", "aarch64"]
build: ["cp38", "cp39", "cp310", "cp311", "cp312"]
exclude:
- os: "macos"
arch: "aarch64"
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up QEMU
if: matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- run: pipx install cibuildwheel
- run: cibuildwheel --output-dir wh
env:
CIBW_BUILD: "${{ matrix.build }}-*"
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_SKIP: "*-musllinux_aarch64"
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux_2_28_x86_64"
CIBW_MANYLINUX_AARCH64_IMAGE: "quay.io/pypa/manylinux_2_28_aarch64"
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_ENVIRONMENT: CMEEL_LOG_LEVEL="DEBUG" CMEEL_JOBS="1" CMEEL_TEST_JOBS="1" CMEEL_RUN_TESTS="false"
- uses: actions/upload-artifact@v4
with:
name: "artifact-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build }}"
path: wh/pin*
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: setup
run: |
python -m pip install -U pip
python -m pip install build cmeel[build] hpp-fcl[build] cmeel-urdfdom[build]
- name: build sdist
run: python -m build -nso dist .
- uses: actions/upload-artifact@v4
with:
path: dist
release:
needs: ["wheel", "sdist"]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- run: curl https://github.com/nim65s.gpg | gpg --import
- name: validate signature
run: >
git verify-tag --raw ${{ github.ref_name }} 2>&1
| grep -q 'VALIDSIG 9B1A79065D2F2B806C8A5A1C7D2ACDAF4653CF28'
- uses: actions/download-artifact@v4
- run: mkdir dist && mv artifact*/* dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true