Skip to content

Commit e0d8853

Browse files
committed
add release action
1 parent c8cb785 commit e0d8853

File tree

2 files changed

+50
-4
lines changed

2 files changed

+50
-4
lines changed

.github/workflows/release.yml

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,61 @@
1-
name: Publish to PyPI
1+
name: Publishing to Pypi
22

33
on:
44
release:
55
types: [published]
66

77
jobs:
8-
build:
8+
test:
9+
name: Test
910
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version:
14+
[
15+
"3.8",
16+
"3.9",
17+
"3.10"
18+
]
19+
1020
steps:
21+
- uses: actions/checkout@v2
1122

12-
- name: Publish a Python distribution to PyPI
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install Dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -e ".[test]"
31+
- name: Run Tests
32+
run: |
33+
pytest
34+
build-n-publish:
35+
name: Build and publish
36+
needs: [test]
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@master
40+
- name: Set up Python 3.10
41+
uses: actions/setup-python@v3
42+
with:
43+
python-version: "3.10"
44+
- name: Install pypa/build
45+
run: >-
46+
python -m
47+
pip install
48+
build
49+
--user
50+
- name: Build a binary wheel and a source tarball
51+
run: >-
52+
python -m
53+
build
54+
--sdist
55+
--wheel
56+
--outdir dist/
57+
- name: Publish distribution 📦 to PyPI
58+
if: startsWith(github.ref, 'refs/tags')
1359
uses: pypa/gh-action-pypi-publish@release/v1
1460
with:
1561
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setuptools.setup(
1111
name="kkiapay",
12-
version="0.0.5",
12+
version="0.0.6",
1313
author="Junior Gantin",
1414
author_email="[email protected]",
1515
description="Community-driven Admin KkiaPay Sdk for Python",

0 commit comments

Comments
 (0)