Skip to content

2.5.0

2.5.0 #59

name: Build and Create Github Release for PR
on:
pull_request:
types:
- opened
- synchronize
- reopened
paths-ignore:
- 'docs/**'
- '.github/**'
- '.gitattributes'
- '.gitignore'
- 'README.md'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install cibuildwheel
run: python -m pip install --upgrade pip cibuildwheel setuptools wheel toml
- name: Build wheels
uses: pypa/cibuildwheel@v3.0.0
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: false
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
publish:
runs-on: ubuntu-latest
needs: [build, build_sdist]
environment:
name: pypi
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Create a GitHub release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: "#${{ github.event.pull_request.number }}"
name: "PR #${{ github.event.pull_request.number }}"
files: |
dist/*
body: |
Auto-generated wheels from PR #[${{github.event.pull_request.number}}](https://github.com/sharktide/restructuredpython/pull/${{github.event.pull_request.number}}).
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}