Skip to content

Commit ce24a58

Browse files
committed
31 | Update workflow version to remove warning
1 parent 9a6ffb2 commit ce24a58

File tree

4 files changed

+67
-6
lines changed

4 files changed

+67
-6
lines changed

.github/workflows/publish-to-pypi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v4
2020
with:
21-
python-version: 3.9
21+
python-version: 3.11
2222

2323
- name: Install build tools
2424
run: pip install build twine wheel cibuildwheel

.github/workflows/test-lib-building.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,28 @@ jobs:
2020
- name: Set up Python
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: 3.9
23+
python-version: 3.11
2424

2525
- name: Install build tools and test dependencies
2626
run: pip install build pytest cython cibuildwheel
2727

2828
- name: Build wheel with cibuildwheel
2929
env:
30-
CIBW_BUILD: cp39-*
30+
CIBW_BUILD: cp311-*
3131
run: cibuildwheel --output-dir wheelhouse
3232

3333
- name: Install built library
3434
run: pip install flask_inputfilter --find-links=wheelhouse/ --force-reinstall
3535

3636
- name: Verify library usage - Part I
3737
run: |
38-
rm -rf flask_inputfilter
38+
python -c "import shutil; shutil.rmtree('flask_inputfilter', ignore_errors=True)"
39+
3940
echo "import flask_inputfilter.InputFilter" > test_script.py
4041
python test_script.py
4142
4243
- name: Verify library usage - Part II
4344
run: |
44-
rm -rf flask_inputfilter
45+
python -c "import shutil; shutil.rmtree('flask_inputfilter', ignore_errors=True)"
46+
4547
pytest test/
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, windows-latest, macos-latest]
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: 3.11
22+
23+
- name: Install build tools
24+
run: pip install build twine wheel cibuildwheel
25+
26+
- name: Build wheel with cibuildwheel
27+
env:
28+
CIBW_BUILD: cp37-*,cp38-*,cp39-*,cp310-*,cp311-*,cp312-*,cp313-*,cp314-*
29+
run: cibuildwheel --output-dir wheelhouse
30+
31+
- name: Upload wheels
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: wheels-${{ matrix.os }}
35+
path: wheelhouse/
36+
37+
publish:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- name: Download wheels
43+
uses: actions/download-artifact@v3
44+
with:
45+
name: wheels-ubuntu-latest
46+
- name: Download wheels
47+
uses: actions/download-artifact@v3
48+
with:
49+
name: wheels-windows-latest
50+
- name: Download wheels
51+
uses: actions/download-artifact@v3
52+
with:
53+
name: wheels-macos-latest
54+
55+
- name: Combine wheels
56+
run: mkdir dist && mv wheelhouse/* dist/
57+
58+
- name: Publish to PyPI
59+
run: ls -la dist

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run Tests
1+
name: Run Tests and Lint
22

33
on: [push]
44

0 commit comments

Comments
 (0)