-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (50 loc) · 1.39 KB
/
release.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
# adapted from: https://github.com/pypa/cibuildwheel/tree/main/examples
name: Release
on:
release:
types: [ published ]
workflow_dispatch:
jobs:
build_wheel_and_sdist:
name: Build wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ '3.8' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python3 -m pip install --upgrade pip setuptools wheel
pip install -r requirements-dev.txt
- name: Build source distribution and pure wheel
run: python -m build
- name: Store the built wheel and sdist
uses: actions/upload-artifact@v3
with:
name: wheel_and_sdist
path: dist
if-no-files-found: error
upload_pypi:
needs: [ build_wheel_and_sdist ]
runs-on: ubuntu-20.04
environment:
name: pypi
url: https://pypi.org/p/pyloras
permissions:
id-token: write
steps:
- name: Pull built wheel and sdist
uses: actions/download-artifact@v3
with:
name: wheel_and_sdist
path: dist
- name: Publish to PyPI
uses: pypa/[email protected]
with:
packages_dir: dist