-
Notifications
You must be signed in to change notification settings - Fork 3
31 lines (31 loc) · 1.04 KB
/
build_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
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on
name: Build test and publish
on: [push, pull_request]
jobs:
build:
name: Build wheel and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install and upgrade pip and wheel
run: |
python -m pip install -U pip wheel --user
- name: Install setuptools
run: |
python -m pip install -U setuptools --user
- name: Build a binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
- name: Test the wheel installation
run: |
pip install -U dist/*.whl
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.amival_token_pypi }}