mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-06 14:19:52 +08:00
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
# From: https://github.com/pypa/cibuildwheel
|
|
name: Upload Python Package
|
|
|
|
on:
|
|
push:
|
|
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build_wheels:
|
|
name: Build wheels on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
# Used to host cibuildwheel
|
|
- uses: actions/setup-python@v2
|
|
|
|
- name: Install deps
|
|
run: sudo apt-get install libsdl-pango-dev
|
|
|
|
- name: Install packages
|
|
run: python -m pip install -U manim tqdm
|
|
|
|
- name: Install cibuildwheel
|
|
run: python -m pip install -U setuptools wheel pip
|
|
|
|
- name: Build wheels
|
|
run: python setup.py sdist
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: dist
|
|
path: dist/*.tar.*
|
|
|
|
release:
|
|
name: Release
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
runs-on: ubuntu-latest
|
|
needs: [ build_wheels ]
|
|
steps:
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
- name: Upload to PyPI
|
|
uses: pypa/gh-action-pypi-publish@master
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|