1
- name : Create Release & Upload To PyPI
1
+ name : Upload Python Package
2
2
3
3
on :
4
4
push :
5
5
# Sequence of patterns matched against refs/tags
6
6
tags :
7
- - v? [0-9]+.[0-9]+.[0-9]+.?(a|b|rc|dev)?[0-9]+ # add .* to allow dev releases
7
+ - v[0-9]+.[0-9]+.* # add .* to allow dev releases
8
8
9
9
jobs :
10
- build :
10
+ deploy :
11
11
name : pipenv PyPI Upload
12
12
runs-on : ubuntu-latest
13
13
env :
14
14
CI : " 1"
15
15
16
16
steps :
17
17
- name : Checkout code
18
- uses : actions/checkout@v1
18
+ uses : actions/checkout@v2
19
19
20
20
- uses : webfactory/ssh-agent@v0.1.1
21
21
with :
@@ -37,14 +37,18 @@ jobs:
37
37
with :
38
38
python-version : 3.7
39
39
40
- - name : Install latest tools for build
40
+ - name : Install dependencies
41
41
run : |
42
- python -m pip install --upgrade --upgrade-strategy=eager pip setuptools wheel invoke
42
+ python -m pip install --upgrade --upgrade-strategy=eager pip setuptools wheel twine
43
43
python -m pip install .
44
44
python -m pipenv install --dev
45
+ env :
46
+ PIPENV_PYTHON : " 3.7"
47
+
45
48
- name : Build wheels
46
49
run : |
47
- python -m pipenv runpython setup.py sdist bdist_wheel
50
+ python -m pipenv run python setup.py sdist bdist_wheel
51
+
48
52
# to upload to test pypi, pass repository_url: https://test.pypi.org/legacy/ and use secrets.TEST_PYPI_TOKEN
49
53
- name : Publish a Python distribution to PyPI
50
54
uses : pypa/gh-action-pypi-publish@master
53
57
password : ${{ secrets.TEST_PYPI_TOKEN }}
54
58
repository_url : https://test.pypi.org/legacy/
55
59
packages_dir : dist/
60
+
56
61
# git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:master
57
62
# we need to use a deploy key for this to get around branch protection as the default token fails
58
63
- name : Pre-bump
61
66
git config --local user.email action@github.com
62
67
python -m pipenv run inv release.bump-version --dev --commit
63
68
git push git@github.com:${{ github.repository }}.git HEAD:master
69
+
0 commit comments