-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (40 loc) · 1.28 KB
/
release.yml
File metadata and controls
48 lines (40 loc) · 1.28 KB
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
# Release to PyPi on release creation
name: Publish to PyPI
on:
workflow_dispatch:
release:
types: [published]
jobs:
pypi_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install package and dependencies
- name: Install
run: |
# Upgrade pip
python -m pip install --upgrade pip
# Install the package
pip install --force-reinstall -e .
# Development dependencies
pip install --force-reinstall -r requirements.txt
# Install additional GitHub actions build dependencies
pip install tox-gh-actions setuptools wheel twine
# Test with tox - uses tox-gh-actions to map build strategy matrix python-version with tox config.
# DO we need to test, or can we rely on testing from elsewhere?
# - name: Test with tox
# run: |
# tox
# Upload to PyPI
- name: Build and Upload to PyPI
run: |
python setup.py sdist bdist_wheel
python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
TWINE_REPOSITORY: pypi