multimodal block #137
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: install requirements | |
run: pip install -r requirements.txt | |
# run unit tests | |
- name: tests_unit | |
run: python -m unittest discover --start-directory ./tests_unit | |
# run integration tests | |
# - name: tests_integration | |
# run: python -m unittest discover --start-directory ./tests_integration | |
# prepare version update | |
- name: extract tag | |
uses: olegtarasov/[email protected] | |
id: get_tag | |
# update versions locally | |
- name: update application version | |
run: python .github/scripts/update_version.py --tagname ${{ steps.get_tag.outputs.tag }} | |
# install build tools | |
- name: install build tools | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade build | |
python -m pip install --upgrade twine | |
# build | |
- name: build | |
run: python -m build | |
# get publish type | |
- name: get publish type | |
id: publish_to | |
run: python .github/scripts/publish_to.py --tagname ${{ steps.get_tag.outputs.tag }} | |
# publish to dev (always) | |
# - name: publish to dev | |
# uses: pypa/gh-action-pypi-publish@master | |
# if: ${{ steps.publish_to.outputs.publish_to_dev }} | |
# with: | |
# password: ${{ secrets.PYPI_API_TOKEN_TEST }} | |
# repository_url: https://test.pypi.org/legacy/ | |
# publish to production (only if version has exactly 3 numbers... e.g. v1.2.3) | |
- name: publish to prod | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: ${{ steps.publish_to.outputs.publish_to_prod }} | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |