From 01cbd9258c317d7b2f924049a4d78e38994a94f4 Mon Sep 17 00:00:00 2001 From: Max Worrall <96847801+Tsunami014@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:19:13 +1100 Subject: [PATCH 1/5] Update python-publish.yml --- .github/workflows/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 8ae5654..8154a5f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,7 +9,7 @@ on: jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Set up Python 3.10 From 1f6237d9b9809848435d224dc363903969e6af65 Mon Sep 17 00:00:00 2001 From: Max Worrall <96847801+Tsunami014@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:27:22 +1100 Subject: [PATCH 2/5] Update python-publish.yml Another attempt at the get current version --- .github/workflows/python-publish.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 8154a5f..2429fb5 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -5,6 +5,7 @@ on: tags: - '*' workflow_dispatch: + jobs: build-n-publish: @@ -22,10 +23,12 @@ jobs: pip install wheel - name: Extract tag name id: tag - run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3) + run: | + echo "Current tag:" + echo ${{ github.event.release.tag_name } - name: Update version in setup.py run: >- - sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py + sed -i "s/{{VERSION_PLACEHOLDER}}/${{ github.event.release.tag_name }/g" setup.py - name: Build a binary wheel run: >- python setup.py sdist bdist_wheel From c88f103a10d1bec838a0f275fe4d910c7dfd9f0e Mon Sep 17 00:00:00 2001 From: Max Worrall <96847801+Tsunami014@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:28:14 +1100 Subject: [PATCH 3/5] Typo in python-publish.yml --- .github/workflows/python-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 2429fb5..ebc1da3 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -25,10 +25,10 @@ jobs: id: tag run: | echo "Current tag:" - echo ${{ github.event.release.tag_name } + echo ${{ github.event.release.tag_name }} - name: Update version in setup.py run: >- - sed -i "s/{{VERSION_PLACEHOLDER}}/${{ github.event.release.tag_name }/g" setup.py + sed -i "s/{{VERSION_PLACEHOLDER}}/${{ github.event.release.tag_name }}/g" setup.py - name: Build a binary wheel run: >- python setup.py sdist bdist_wheel From 50e4a40c9834dd3dad886461bd0e75dd124d5de7 Mon Sep 17 00:00:00 2001 From: Max Worrall <96847801+Tsunami014@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:30:23 +1100 Subject: [PATCH 4/5] Update python-publish.yml Now it works :) --- .github/workflows/python-publish.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index ebc1da3..ea7aed3 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -21,14 +21,9 @@ jobs: run: >- python -m pip install wheel - - name: Extract tag name - id: tag - run: | - echo "Current tag:" - echo ${{ github.event.release.tag_name }} - name: Update version in setup.py run: >- - sed -i "s/{{VERSION_PLACEHOLDER}}/${{ github.event.release.tag_name }}/g" setup.py + sed -i "s/{{VERSION_PLACEHOLDER}}/$${{github.ref_name}}/g" setup.py - name: Build a binary wheel run: >- python setup.py sdist bdist_wheel From db7d85c04e203d9fb2aa04e2ad7c51493e80f61d Mon Sep 17 00:00:00 2001 From: Max Worrall <96847801+Tsunami014@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:31:32 +1100 Subject: [PATCH 5/5] Update python-publish.yml got rid of the auto version :( --- .github/workflows/python-publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index ea7aed3..5cb0269 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -21,9 +21,6 @@ jobs: run: >- python -m pip install wheel - - name: Update version in setup.py - run: >- - sed -i "s/{{VERSION_PLACEHOLDER}}/$${{github.ref_name}}/g" setup.py - name: Build a binary wheel run: >- python setup.py sdist bdist_wheel