ci:use github actions to publish to pypi

Using github action - passwords are secured in secrets, and it seperated the publishing the package from testing the package. This closes #20
This commit is contained in:
mb
2020-10-06 09:21:16 +02:00
parent 6b175bacf8
commit 1556bc7f18
2 changed files with 30 additions and 15 deletions

26
.github/workflows/pypi-publish.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
on:
push:
tags:
- v*
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build package
run: |
python setup.py compile_catalog sdist bdist_wheel
- name: pypi-publish
uses: pypa/gh-action-pypi-publish@v1.3.1
with:
user: __token__
password: ${{ secrets.pypi_password }}

View File

@@ -5,6 +5,9 @@
# invenio-config-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
branches:
except:
- /^v\d+\.\d+(\.\d+)?(\S*)?$/
notifications:
email: false
@@ -48,17 +51,3 @@ script:
after_success:
- coveralls
deploy:
skip_cleanup: true
skip_existing: true
provider: pypi
username: __token__
password:
secure: FV4q3fCEOwqurKkIp84YUf6FnnHGTey9rD/G0go641z7TGiVNw6703kUoJpPuklNNPjZwsfvawxzoNTSRHTMWyli2FeMIsZKTIEUs3QNOIpn8rM2owLFL3M6OH+tD8bdNezK61FLFx1eXjNjAn6W1sm5JMC6T0Visq/knMvBKOIyYOFxnNHgyCWZ52nMb0zRlxpkkPyxWF/6oVUKYhX5WAgmnIQaSyYHee0Ds7Xi3qn3isUnizGDvJwXcErIb+ME7a/GioUP4k/hHO+4WG+8+pgR1IgIyM6IyZ5xujzZGOmjuy5x0uQTJBzzFXvzUTOrxcpNUx9qxcYyyCFC93BCtGM84T2xhpMgAQss3qQjzgKxSe04t+s47XIuLUmxF2F2QhbaKOIAkASNCHMRy2Y1lXZb6xufydlv1q6u5poR7k/uxbDe6JcaotvspKc0qfb/PTbL077QjKfOpHnbdkpJNHUVioholWyJRnsk0H+OWQpQDs2Bh/Fl5B90AxVTYfYKw2reamrjgeVdc3EG7b8raLzGJ6+BTX/NpcfWyDcuG4Yhcn2RRG61+vuD6P16tGsvjWQ34A+T1KfySCpFFoVoSa8W5ZO6tXagiSo7Tl4LPiVm7GtFIcIxDnXqNsbD9VhJfppwCuM6qzfgPA360v9BEAtQPrpM72ogRS5K6yidYv4=
distributions: sdist bdist_wheel
on:
tags: true
python: "3.6"
repo: mb-wali/invenio-config-tugraz
condition: $DEPLOY = true