Skip to content

CU-8692x4b37: Make sure that the production runs on the correct branch #60

CU-8692x4b37: Make sure that the production runs on the correct branch

CU-8692x4b37: Make sure that the production runs on the correct branch #60

Workflow file for this run

name: production
on:
push:
branches: [ production, "v[0-9]+.[0-9]+.post" ]
release:
types: [ published ]
jobs:
build-n-publish-to-pypi:
runs-on: ubuntu-20.04
concurrency: build-n-publish-to-pypi
if: github.repository == 'CogStack/MedCAT'
steps:
- name: Checkout production
uses: actions/checkout@v2
with:
ref: ${{ github.event.release.target_commitish }}
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Run UATs
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
python -m unittest discover
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish production distribution to PyPI
if: github.event_name == 'release' && github.event.release.tag_name
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}