Skip to content

Commit 6ac55af

Browse files
committed
chore: add workflow and tests
1 parent 00c6800 commit 6ac55af

File tree

4 files changed

+39
-58
lines changed

4 files changed

+39
-58
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Dump GitHub context
13+
env:
14+
GITHUB_CONTEXT: ${{ toJson(github) }}
15+
run: echo "$GITHUB_CONTEXT"
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.7'
21+
- uses: actions/cache@v2
22+
id: cache
23+
with:
24+
path: ${{ env.pythonLocation }}
25+
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish
26+
- name: Install poetry
27+
if: steps.cache.outputs.cache-hit != 'true'
28+
run: pip install poetry
29+
- name: Install Dependencies
30+
if: steps.cache.outputs.cache-hit != 'true'
31+
run: poetry install
32+
- name: Publish
33+
env:
34+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
35+
run: poetry publish --build
36+
- name: Dump GitHub context
37+
env:
38+
GITHUB_CONTEXT: ${{ toJson(github) }}
39+
run: echo "$GITHUB_CONTEXT"

setup.cfg

Lines changed: 0 additions & 33 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)