-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.59 KB
/
pypi.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
54
name: deploy
on:
push:
tags:
- "*"
jobs:
publish:
name: 📦 PyPI 🐍
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# tags needed for dynamic versioning
fetch-depth: 0
- name: Set up Python 🐍
id: setup-python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
installer-parallel: true
- name: Install version management tool
run: |
# same poetry env
PIP="$(head -n1 $(which poetry) | cut -c 3-) -m pip"
${PIP} install poetry-dynamic-versioning
- name: Install dependencies 📦
run: poetry install --no-interaction --no-root --with test ${{ inputs.poetry-extras }}
- name: Install project
# it is required to repeat extras, otherwise they will be removed from
# the environment
run: poetry install --no-interaction ${{ inputs.poetry-extras }}
- name: Download the theory
run: poetry run nns get theory
- name: Install task runner
run: pip install poethepoet
- name: Test
run: |
# run tests just before deployment
poe test
- name: Package the distribution
run: |
# package the pure python wheel
poetry build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}