From be695b749c32a32f1b0df54710a112de81e99761 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Sun, 5 Jul 2020 10:36:07 +0100 Subject: [PATCH 1/8] publish to test pypi --- .github/workflows/publish-to-test-pypi.yml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish-to-test-pypi.yml diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml new file mode 100644 index 0000000..660b1f7 --- /dev/null +++ b/.github/workflows/publish-to-test-pypi.yml @@ -0,0 +1,32 @@ +name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI + +on: push + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@master + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Install pep517 + run: >- + python -m + pip install + pep517 + --user + - name: Build a binary wheel and a source tarball + run: >- + python -m + pep517.build + --source + --binary + --out-dir dist/ + - name: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.test_pypi_password }} + repository_url: https://test.pypi.org/legacy/ From 9ecd20e3d6c09e6c3e6c99ebaf42291b28740c98 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Sun, 5 Jul 2020 10:59:15 +0100 Subject: [PATCH 2/8] update pypi script --- .github/workflows/publish-to-test-pypi.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 660b1f7..c65a025 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -5,28 +5,19 @@ on: push jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@master - name: Set up Python 3.7 uses: actions/setup-python@v1 with: python-version: 3.7 - - name: Install pep517 - run: >- - python -m - pip install - pep517 - --user - name: Build a binary wheel and a source tarball - run: >- - python -m - pep517.build - --source - --binary - --out-dir dist/ + run: | + python setup.py bdist_wheel + python setup.py sdist --formats=gztar,zip - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy/ + repository_url: https://test.pypi.org/avegame From e0cc283da7a140c093d6b81f4f0839fa14a93730 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Sun, 5 Jul 2020 11:02:18 +0100 Subject: [PATCH 3/8] pip install wheel --- .github/workflows/publish-to-test-pypi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index c65a025..fcfcdea 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -14,6 +14,7 @@ jobs: python-version: 3.7 - name: Build a binary wheel and a source tarball run: | + pip install wheel python setup.py bdist_wheel python setup.py sdist --formats=gztar,zip - name: Publish distribution 📦 to Test PyPI From 3fa24de0f948cc48e5ce4cc2cc05b8915c6e739e Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Sun, 5 Jul 2020 11:07:42 +0100 Subject: [PATCH 4/8] correct url --- .github/workflows/publish-to-test-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index fcfcdea..d64381b 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -21,4 +21,4 @@ jobs: uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/avegame + repository_url: https://test.pypi.org/legacy From 862537cbc1ccee68c389c363665b1e897096b697 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Sun, 5 Jul 2020 11:09:51 +0100 Subject: [PATCH 5/8] / --- .github/workflows/publish-to-test-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index d64381b..be43eeb 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -21,4 +21,4 @@ jobs: uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy + repository_url: https://test.pypi.org/legacy/ From 52eb37ce3a82ecb524c73a542f5189b991e6e36f Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Sun, 5 Jul 2020 11:11:37 +0100 Subject: [PATCH 6/8] only one source --- .github/workflows/publish-to-test-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index be43eeb..d1d9aaf 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -16,7 +16,7 @@ jobs: run: | pip install wheel python setup.py bdist_wheel - python setup.py sdist --formats=gztar,zip + python setup.py sdist --formats=gztar - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@master with: From f1dc1b9985ee7db75a42e08c30a6ad0b2d33e81c Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Sun, 5 Jul 2020 11:19:40 +0100 Subject: [PATCH 7/8] only push to PyPI when version is maed --- .github/workflows/publish-to-test-pypi.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index d1d9aaf..f0b421a 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -1,10 +1,14 @@ -name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI +name: Publish 🐍 📦 to PyPI and TestPyPI -on: push +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' jobs: build-n-publish: - name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI + name: Build and publish 🐍 📦 to PyPI and TestPyPI runs-on: ubuntu-20.04 steps: - uses: actions/checkout@master @@ -17,7 +21,7 @@ jobs: pip install wheel python setup.py bdist_wheel python setup.py sdist --formats=gztar - - name: Publish distribution 📦 to Test PyPI + - name: Publish 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.test_pypi_password }} From c82ff955994fd8ab32b1ab79a0bd428e35da933c Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Sun, 5 Jul 2020 11:21:02 +0100 Subject: [PATCH 8/8] VERSION -> 1.9.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 872765e..9ab8337 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.9 \ No newline at end of file +1.9.1