-
Notifications
You must be signed in to change notification settings - Fork 22
38 lines (36 loc) · 975 Bytes
/
deploy.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
name: Deploy
on:
push:
tags:
- '*'
jobs:
deploy:
name: Publish package to PyPI
runs-on: ubuntu-latest
steps:
- name: Wait for tests to succeed
uses: fountainhead/action-wait-for-check@v1.0.0
id: wait-for-ci
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: success
- name: Exit if CI did not succeed
if: steps.wait-for-ci.outputs.conclusion != 'success'
run: exit 1
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
set -xeu
python -VV
pip install build
- name: Build the wheel
run: python -m build --sdist --wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}