Skip to content

Commit e2a0fa9

Browse files
authored
Merge pull request #30 from ahebrank/publish
Publish to PyPI
2 parents e0f4d33 + 36990dd commit e2a0fa9

2 files changed

Lines changed: 31 additions & 8 deletions

File tree

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on: [push, pull_request]
2+
3+
jobs:
4+
publish:
5+
name: build and publish to pypi
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
10+
- name: install dependencies & build
11+
run: |
12+
pip3 install setuptools wheel
13+
python3 setup.py sdist bdist_wheel
14+
15+
- name: publish to Test PyPi
16+
uses: pypa/gh-action-pypi-publish@release/v1
17+
with:
18+
skip_existing: true
19+
user: __token__
20+
password: ${{ secrets.TEST_PYPI_TOKEN }}
21+
repository_url: https://test.pypi.org/legacy/
22+
23+
- name: publish to PyPi
24+
if: startsWith(github.ref, 'refs/tags')
25+
uses: pypa/gh-action-pypi-publish@release/v1
26+
with:
27+
user: __token__
28+
password: ${{ secrets.PYPI_TOKEN }}

setup.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
import os
2-
from distutils.core import setup
3-
4-
about = {}
5-
here = os.path.abspath(os.path.dirname(__file__))
6-
with open(os.path.join(here,'gwh', '__version__.py'), encoding='utf-8') as f:
7-
exec(f.read(), about)
2+
from setuptools import setup
83

94
setup(
10-
name=about['__title__'],
11-
version=about['__version__'],
5+
name="gwh",
126
author='Andy Hebrank',
137
author_email='ahebrank@gmail.com',
148
packages=['gwh'],
159
url='https://github.com/ahebrank/gitlab-webhook-handler',
1610
description='Webhook Handler for GitLab',
1711
license='Apache License, Version 2.0',
1812
long_description=open('README.md', encoding='utf-8').read(),
13+
long_description_content_type='text/markdown',
1914
install_requires=[
2015
'Flask>=1.0',
2116
'requests>=2.19.0'

0 commit comments

Comments
 (0)