forked from CogStack/MedCAT
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.22 KB
/
production.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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@v4
with:
ref: ${{ github.event.release.target_commitish }}
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v4
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: startsWith(github.ref, 'refs/tags')
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}