Skip to content

Commit 6130107

Browse files
committed
Add CI and example
1 parent 453621f commit 6130107

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.11'
15+
- run: python -m pip install --upgrade pip
16+
- run: pip install . pytest
17+
- run: pytest

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-python@v5
12+
with:
13+
python-version: '3.11'
14+
- run: python -m pip install --upgrade pip build twine
15+
- run: python -m build
16+
- run: python -m twine upload dist/*
17+
env:
18+
TWINE_USERNAME: __token__
19+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

examples/basic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from yournotify import Yournotify
2+
client = Yournotify('YOUR_API_KEY')
3+
print(client.get_profile())

0 commit comments

Comments
 (0)