diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d056131 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install packaging setuptools twine wheel + - name: Build package + run: | + python setup.py sdist bdist_wheel + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/abismal/VERSION b/abismal/VERSION new file mode 100644 index 0000000..8acdd82 --- /dev/null +++ b/abismal/VERSION @@ -0,0 +1 @@ +0.0.1 diff --git a/setup.py b/setup.py index 84d4626..9983f35 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,10 @@ from setuptools import setup, find_packages +# Get version number +def getVersionNumber(): + with open("abismal/VERSION", "r") as vfile: + version = vfile.read().strip() + return version PROJECT_URLS = { "Bug Tracker": "https://github.com/rs-station/abismal/issues",