Add pypi build step

This commit is contained in:
Matthias 2020-02-17 20:16:24 +01:00
parent 7b9bd70d97
commit 0b33b798e4
2 changed files with 29 additions and 2 deletions

View File

@ -7,6 +7,8 @@ on:
- develop
- github_actions_tests
tags:
release:
types: [published]
pull_request:
schedule:
- cron: '0 5 * * 4'
@ -191,15 +193,40 @@ jobs:
deploy:
needs: [ build, build_windows, docs_check ]
runs-on: ubuntu-18.04
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'freqtrade/freqtrade'
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/freqtrade'
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Build distribution
run: |
pip install -U setuptools wheel
python setup.py sdist bdist_wheel
- name: Publish to PyPI (Test)
uses: pypa/gh-action-pypi-publish@master
if: (steps.extract_branch.outputs.branch == 'master' || github.event_name == 'release')
with:
user: __token__
password: ${{ secrets.pypi_test_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
if: (steps.extract_branch.outputs.branch == 'master' || github.event_name == 'release')
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Build and test and push docker image
env:
IMAGE_NAME: freqtradeorg/freqtrade

View File

@ -1,4 +1,4 @@
""" FreqTrade bot """
""" Freqtrade bot """
__version__ = 'develop'
if __version__ == 'develop':