Skip to content

Commit 6000357

Browse files
added action
1 parent 85c3011 commit 6000357

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish WorkFlow
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: [3.8]
13+
steps:
14+
- name: 🛎️ Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
ref: ${{ github.head_ref }}
18+
- name: 🐍 Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: 🦾 Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install ".[dev]"
26+
- name: 🚀 Publish to PyPi
27+
env:
28+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
29+
TWINE_PASSWORD: ${{ secrets.PASSWORD }}
30+
run: |
31+
python setup.py sdist bdist_wheel
32+
twine check dist/*
33+
twine upload dist/*

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ name: Test WorkFlow
22

33
on:
44
pull_request:
5-
branches: [master]
5+
branches: [main]
66

77
jobs:
88
build:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
1212
python-version: [3.7, 3.8, 3.9]
13-
1413
steps:
1514
- name: 🛎️ Checkout
1615
uses: actions/checkout@v3

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
],
1919
packages=find_packages(exclude=("tests",)),
2020
extras_require={
21-
"dev": ["flake8", "black==22.3.0", "isort"],
21+
"dev": ["flake8", "black==22.3.0", "isort", "twine"],
2222
},
2323
classifiers=[
2424
"Programming Language :: Python :: 3",

0 commit comments

Comments
 (0)