-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (31 loc) · 993 Bytes
/
pypi.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
name: pypi
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: config
run: |
RELEASE=${GITHUB_REF##*/}
sed -i -e "s/version=\".*\"/version=\"$RELEASE\"/" setup.py
echo $RELEASE
cat setup.py
- name: Install pip, setuptools, wheel, twine
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TODO COOKIETEMPLE: Configure your secrets to enable automatic deployment to PyPi on releases
# https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*