From 84d5f653b6388e2890821031709ee1b12490b759 Mon Sep 17 00:00:00 2001 From: Jordan Milne Date: Mon, 13 Nov 2023 17:24:31 +0000 Subject: [PATCH] v0.2 (and publish to PyPI) --- .github/workflows/publish.yml | 41 +++++++++++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..af8a55d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,41 @@ +name: Publish to PyPI + +on: + release: + types: + - created + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.11 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install -e . + - name: Build + run: >- + python setup.py sdist bdist_wheel + + - name: Publish to Test PyPI + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + + - name: Publish to PyPI + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/setup.py b/setup.py index 74c3e54..afed4e3 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setuptools.setup( name="ShenanigaNFS", - version="0.1", + version="0.2", author="Jordan Milne", author_email="JordanMilne@users.noreply.github.com", description="Library for making somewhat conformant NFS and SunRPC clients and servers",