Skip to content

[#310] Publish bsk_rl wheels to PyPi #1

[#310] Publish bsk_rl wheels to PyPi

[#310] Publish bsk_rl wheels to PyPi #1

Workflow file for this run

name: Publish Wheels
on:
push:
tags:
- "v[0-9]*"
- "test*"
jobs:
build-wheels:
name: Build BSK-RL Wheels
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-13 # x86_64
- macos-latest # ARM64
- ubuntu-latest # x86_64
- ubuntu-22.04-arm # ARM64
- windows-latest # x86_64
steps:
- name: Checkout Code
uses: actions/checkout@v5
with:
ref: ${{ github.ref }}
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.4
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.ref }}
- uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
publish:
name: Publish to PyPI
needs: [build-wheels, make_sdist]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout tagged source
uses: actions/checkout@v5
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Download wheels
uses: actions/download-artifact@v4
with:
pattern: cibw-wheels-*
merge-multiple: true
path: dist
- name: Download sdist
uses: actions/download-artifact@v4
with:
name: cibw-sdist
path: dist
- name: Publish to TestPyPI (test tags)
if: startsWith(github.ref, 'refs/tags/test')
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: dist
skip-existing: true
verbose: true
- name: Publish to PyPI (real releases)
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist