Skip to content

v0.4.1

v0.4.1 #15

Workflow file for this run

name: Release Actions
on:
workflow_dispatch:
release:
types: [published]
jobs:
upload-pypi:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Checkout Current Repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt install python3-dev
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install twine
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: aarch64
- name: Build wheels with cibuildwheels
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_ARCHS_LINUX: aarch64 native
CIBW_SKIP: cp36* pp* *musllinux*
- name: Move cross-compiled wheels to dist folder
run: |
mkdir -p dist
mv ./wheelhouse/*.whl ${{ github.workspace }}/dist/
- name: build source distributable wheel
# sdist for non-supprted platforms will serve as a stub lib install
run: |
python -m pip install build
python -m build -s
- name: Save distributable wheels as artifacts
uses: actions/upload-artifact@v4
with:
name: "pyRF24_pkg_dist"
path: ${{ github.workspace }}/dist
- name: Publish package (to TestPyPI)
if: github.event_name == 'workflow_dispatch'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: twine upload --repository testpypi dist/*
- name: Publish to PyPi
# only upload distributions to PyPi when triggered by a published release
if: github.event_name == 'release'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_token }}
run: twine upload dist/*