Skip to content

Commit

Permalink
project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaelicke committed Jul 17, 2023
1 parent d98521c commit 2b8c613
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Upload Python Package

on: push

jobs:
deploy:
name: Publish to PyPI
runs-on: ubuntu-20.04
if: startsWith(github.event.ref, 'refs/tags/v')

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions hserv/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .__version__ import __version__
1 change: 1 addition & 0 deletions hserv/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__= '0.0.1'
19 changes: 19 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from setuptools import setup, find_packages


def version():
with open('hserv/__version__.py') as f:
loc = dict()
exec(f.read(), loc, loc)
return loc['__version__']


setup(
name='hserv',
version=version(),
author='Mirko Mälicke',
author_email='mirko@hydrocode.de',
description='cli / api toolchain for managing hydrocode servers',
install_requires=[],
packages=find_packages(),
)

0 comments on commit 2b8c613

Please sign in to comment.