-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (71 loc) · 1.98 KB
/
pythonpublish.yml
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
67
68
69
70
71
72
73
74
75
76
name: Upload Python Package
on:
release:
types: [created]
jobs:
build-wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"]
poetry-version: ["1.4.2"]
steps:
- uses: actions/checkout@v1
- name: Set up Python-${{ matrix.python-version }} (Platform ${{ matrix.os }})
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry (Platform ${{ matrix.os }})
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Build ${{ matrix.os }} binaries
run: poetry build
- name: Store dist artifacts
uses: actions/upload-artifact@v1
with:
name: yesql-dist
path: dist
build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.4.2
- name: Build sdist
run: poetry build -f sdist
- name: Store dist artifacts
uses: actions/upload-artifact@v1
with:
name: yesql-dist
path: dist
deploy:
runs-on: ubuntu-latest
needs: [build-wheels, build-sdist]
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Download distribution artifact
uses: actions/download-artifact@master
with:
name: yesql-dist
path: dist
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.4.2
- name: Publish to PyPI
run: poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}