Skip to content

Commit fce9546

Browse files
chore(ci/deps): publish wheels and add manim/manimgl as extras (#173)
* chore(deps): add manim and manimgl as extras * chore(ci): publish wheels too * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore(ci): run tests on dep. changes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore(ci): only use extras to build pages --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent d6ad561 commit fce9546

File tree

5 files changed

+449
-463
lines changed

5 files changed

+449
-463
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@ jobs:
4646
run: |
4747
sudo apt-get update
4848
sudo apt-get install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev
49-
- name: Install Python dependencies
50-
run: pip install manim sphinx sphinx_click furo
5149
- name: Install local Python package
52-
run: poetry install --with docs
50+
run: poetry install --extras=manim --with docs
5351
- name: Restore cached media
5452
id: cache-media-restore
5553
uses: actions/cache/restore@v3
Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Modified from: https://github.com/pypa/cibuildwheel
21
name: Upload Python Package
32

43
on:
@@ -8,41 +7,28 @@ on:
87
types: [published]
98

109
jobs:
11-
build_wheels:
12-
name: Build wheels on ${{ matrix.os }}
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
matrix:
16-
os: [ubuntu-latest]
10+
build_and_release:
11+
name: Build and release
12+
runs-on: ubuntu-latest
1713

1814
steps:
19-
- uses: actions/checkout@v2
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
2017

21-
- uses: actions/setup-python@v2
18+
- name: Install Poetry
19+
run: pipx install poetry
2220

23-
- name: Install build package
24-
run: python -m pip install -U build
21+
- name: Install Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.10'
25+
cache: poetry
2526

2627
- name: Build wheels
27-
run: python -m build --sdist
28+
run: poetry build
2829

29-
- uses: actions/upload-artifact@v2
30-
with:
31-
name: dist
32-
path: dist/*.tar.*
33-
34-
release:
35-
name: Release
36-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
37-
runs-on: ubuntu-latest
38-
needs: [build_wheels]
39-
steps:
40-
- uses: actions/download-artifact@v2
41-
with:
42-
name: dist
43-
path: dist/
44-
- name: Upload to PyPI
45-
uses: pypa/gh-action-pypi-publish@master
46-
with:
47-
user: __token__
48-
password: ${{ secrets.PYPI_API_TOKEN }}
30+
- name: Publish to PyPI
31+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
32+
env:
33+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
34+
run: poetry publish

.github/workflows/test_examples.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
on:
22
pull_request:
33
paths:
4+
- pyproject.toml
5+
- poetry.lock
46
- '**.py'
57
- .github/workflows/test_examples.yml
68
workflow_dispatch:

0 commit comments

Comments
 (0)