forked from kivy-garden/garden.iconfonts
-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (64 loc) · 2.27 KB
/
publish.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
55
56
57
58
59
60
61
62
63
64
65
66
name: publish
on:
release:
types:
- published
jobs:
publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7]
os: [ubuntu-latest]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2.3.3
- name: setting up python ${{ matrix.python-version }}
uses: actions/setup-python@v2.1.4
with:
python-version: ${{ matrix.python-version }}
- name: set pip cache dir
run: echo "::set-env name=pip-cache::$(pip cache dir)"
- name: caching pip storage
uses: actions/cache@v2.1.2
with:
path: ${{ env.pip-cache }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/poetry.lock') }}
- name: installing poetry
run: |
pip install poetry
pip install poetry-dynamic-versioning
- name: set poetry cache dir
run: |
echo "::set-env name=poetry-cache::$(poetry config cache-dir)"
echo "::set-env name=poetry-version::$(poetry --version)"
- name: caching poetry environment
uses: actions/cache@v2.1.2
with:
path: ${{ env.poetry-cache }}
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ env.poetry-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ env.poetry-version }}-${{ hashFiles('**/poetry.lock') }}
- name: installing dependencies
run: poetry install -n -vv --no-ansi
- name: running tests
run: poetry run green -vv
- name: building
run: poetry build -n -vv --no-ansi
- name: generate coverage xml
run: poetry run coverage xml
- name: uploading coverage to codecov
uses: codecov/codecov-action@v1.0.13
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: python ${{ matrix.python-version }} on ${{ runner.os }}
- name: publishing
run: poetry publish -n -vv --no-ansi
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}