Skip to content

Commit

Permalink
Merge pull request #30 from ahebrank/publish
Browse files Browse the repository at this point in the history
Publish to PyPI
  • Loading branch information
ahebrank authored Jan 17, 2023
2 parents e0f4d33 + 36990dd commit e2a0fa9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on: [push, pull_request]

jobs:
publish:
name: build and publish to pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: install dependencies & build
run: |
pip3 install setuptools wheel
python3 setup.py sdist bdist_wheel
- name: publish to Test PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: publish to PyPi
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
11 changes: 3 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
import os
from distutils.core import setup

about = {}
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here,'gwh', '__version__.py'), encoding='utf-8') as f:
exec(f.read(), about)
from setuptools import setup

setup(
name=about['__title__'],
version=about['__version__'],
name="gwh",
author='Andy Hebrank',
author_email='[email protected]',
packages=['gwh'],
url='https://github.com/ahebrank/gitlab-webhook-handler',
description='Webhook Handler for GitLab',
license='Apache License, Version 2.0',
long_description=open('README.md', encoding='utf-8').read(),
long_description_content_type='text/markdown',
install_requires=[
'Flask>=1.0',
'requests>=2.19.0'
Expand Down

0 comments on commit e2a0fa9

Please sign in to comment.