Skip to content

Commit

Permalink
Add automated deployment to PyPI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lattyware committed Oct 31, 2019
1 parent d6192a3 commit f883ca8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 8 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
long_description = readme.read()

setuptools.setup(
name="unrpa",
name=meta.name,
version=meta.version,
author="Gareth Latty",
author_email="[email protected]",
description="Extract files from the RPA archive format (from the Ren'Py Visual Novel Engine).",
description=meta.description,
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Lattyware/unrpa",
Expand Down
7 changes: 2 additions & 5 deletions unrpa/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@


def main() -> None:
parser = argparse.ArgumentParser(
prog="unrpa",
description="Extract files from the RPA archive format (from the Ren'Py Visual Novel Engine).",
)
parser = argparse.ArgumentParser(prog=meta.name, description=meta.description)

parser.add_argument(
"-v",
Expand Down Expand Up @@ -112,7 +109,7 @@ def main() -> None:
)

parser.add_argument(
"--version", action="version", version=f"%(prog)s {meta.version}"
"--version", action="version", version=f"{meta.name} {meta.version}"
)

parser.add_argument(
Expand Down
6 changes: 5 additions & 1 deletion unrpa/meta.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
version = "2.1.0"
name = "unrpa"
version = "2.1.1"
description = (
"Extract files from the RPA archive format (from the Ren'Py Visual Novel Engine)."
)

0 comments on commit f883ca8

Please sign in to comment.