Skip to content

Bump prefix-dev/setup-pixi in the github-actions group #106

Bump prefix-dev/setup-pixi in the github-actions group

Bump prefix-dev/setup-pixi in the github-actions group #106

Workflow file for this run

name: Wheels
# no permissions by default
permissions: {}
on:
pull_request:
push:
release:
types:
- published
jobs:
build_bdist:
name: "Build ${{ matrix.os }} (${{ matrix.arch }}) wheels"
runs-on: ${{ matrix.os }}
permissions:
contents: read
actions: write # for uploading artifacts
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
arch: ["x86_64", "arm64", "AMD64"]
exclude:
- os: ubuntu-latest
arch: arm64
- os: ubuntu-latest
arch: AMD64
- os: windows-latest
arch: arm64
- os: windows-latest
arch: x86_64
- os: macos-latest
arch: AMD64
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
- name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
uses: pypa/cibuildwheel@95d2f3a92fbf80abe066b09418bbf128a8923df2 # v3.0.1
env:
# Skips pypy and musllinux for now.
CIBW_SKIP: "pp* cp36-* cp37-* *-musllinux*"
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD_FRONTEND: build
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: >
python -c "import ciso; print(f'ciso v{ciso.__version__}')" &&
python -m pytest --pyargs ciso
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: pypi-artifacts-${{ matrix.os }}-${{ matrix.arch }}
path: ${{ github.workspace }}/wheelhouse/*.whl
show-artifacts:
needs: [build_bdist]
name: "Show artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: pypi-artifacts*
path: ${{ github.workspace }}/dist
merge-multiple: true
- shell: bash
run: |
ls -l ${{ github.workspace }}/dist
publish-artifacts-pypi:
needs: [build_bdist]
name: "Publish to PyPI"
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/ciso/
permissions:
id-token: write # for trusted publishing to PyPI
actions: read # for downloading artifacts
# upload to PyPI for every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: pypi-artifacts*
path: ${{ github.workspace }}/dist
merge-multiple: true
- name: Publish package distributions to PyPI
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4