-
Notifications
You must be signed in to change notification settings - Fork 8
42 lines (34 loc) · 971 Bytes
/
publish.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
name: Deploy
on:
push:
tags:
- '*'
jobs:
deploy:
name: Publish package to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: Install
run: pip install build
- name: Wait for tests to succeed
uses: fountainhead/[email protected]
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
- name: Build package
run: python -m build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: "${{ secrets.PYPI_TOKEN }}"