This repository was archived by the owner on Feb 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (51 loc) · 1.41 KB
/
Copy pathbuild.yml
File metadata and controls
66 lines (51 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build
on:
push:
branches:
- main
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, 3.11]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade Pip
run: pip install --upgrade pip
- name: Install dependencies
run: pip install --no-cache-dir -r requirements.txt
- name: Install build module
run: pip install --no-cache-dir build
- name: Run tests
run: pytest tests
- name: Build package
run: python -m build
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install twine & wheel
run: pip install --no-cache-dir twine wheel
- name: Create Distribution Package
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m twine upload --skip-existing dist/*