LimeDriverBindings/.github/workflows/python-publish_musllinux.yml

65 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2024-04-23 09:23:57 +00:00
name: Build, Test, and Upload Python Package (musllinux)
2024-04-20 08:53:00 +00:00
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
permissions:
contents: read
jobs:
# test:
# uses: ./.github/workflows/ubuntu-python-package.yml # use the callable tests job to run tests
deploy:
runs-on: ubuntu-latest
# needs: [test]
steps:
2024-04-20 09:10:02 +00:00
- name: Update package list
run: |
sudo apt-get update
2024-04-20 08:53:00 +00:00
2024-04-20 09:02:18 +00:00
- name: Install git
run: |
sudo apt-get install -y git
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: 'recursive'
2024-04-20 09:10:02 +00:00
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
2024-04-21 10:50:00 +00:00
- name: Set up QEMU
2024-04-21 10:50:35 +00:00
uses: docker/setup-qemu-action@v3
2024-04-21 10:50:00 +00:00
2024-04-20 09:10:02 +00:00
- name: Prepare Python environment
2024-04-20 08:53:00 +00:00
run: |
2024-04-20 09:10:02 +00:00
python -m venv venv
. ./venv/bin/activate
pip install -U twine cibuildwheel build
2024-04-20 08:53:00 +00:00
- name: Build wheels musllinux
2024-04-21 10:24:43 +00:00
run: |
. ./venv/bin/activate
python -m cibuildwheel --output-dir dist
2024-04-21 10:18:23 +00:00
env:
CIBW_BEFORE_BUILD: ./build_wheel.sh
CIBW_SKIP: "*-manylinux_*"
2024-04-20 09:10:02 +00:00
2024-04-20 08:53:00 +00:00
- name: Publish to PyPI
run: |
2024-04-21 17:47:58 +00:00
. ./venv/bin/activate
2024-04-20 08:53:00 +00:00
python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/*
env:
PYPI: ${{ secrets.PYPI }}