Skip to content

Commit f969317

Browse files
committed
chore: add workflow
1 parent 2c28d62 commit f969317

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: publish
2+
on:
3+
push:
4+
tags:
5+
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching *, i.e. 1.0, 20.15.10
6+
7+
jobs:
8+
publish:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: [3.11]
13+
os: [ubuntu-latest]
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Install poetry
18+
run: pipx install poetry
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
cache: "poetry"
24+
- name: Install dependencies
25+
run: |
26+
poetry install
27+
- name: Lint with flake8
28+
run: |
29+
poetry run flake8 src
30+
- name: Run unit tests
31+
run: |
32+
poetry run pytest --doctest-modules --ignore=examples --cov=sidan_gin --cov-config=.coveragerc --cov-report=xml
33+
- name: poetry-check
34+
run: |
35+
poetry check
36+
- name: poetry-publish
37+
run: |
38+
poetry publish --build --username __token__ --password ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)