From a513e3be16cce5e98575bdbe180c87fcfc0e8dad Mon Sep 17 00:00:00 2001 From: mkolasinski-splunk <105011638+mkolasinski-splunk@users.noreply.github.com> Date: Mon, 13 Feb 2023 18:43:29 +0100 Subject: [PATCH] chore: introduce internal publish pypi action (#646) * chore: introduce pypi action * chore: remove beta version regex --- .github/workflows/build-test-release.yml | 10 ++++++++-- .github/workflows/sr-prepare.sh | 5 ----- .github/workflows/sr-release.sh | 6 ------ .releaserc | 3 --- 4 files changed, 8 insertions(+), 16 deletions(-) delete mode 100755 .github/workflows/sr-prepare.sh delete mode 100755 .github/workflows/sr-release.sh diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 292351b1b..04a4b0e5c 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -226,11 +226,17 @@ jobs: - name: Update Notices run: cp -f THIRDPARTY NOTICE - name: Semantic Release + id: semantic uses: splunk/semantic-release-action@v1.2 with: extra_plugins: | @google/semantic-release-replace-plugin env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }} - PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + - name: Publish to pypi + if: ${{ steps.semantic.outputs.new_release_published == 'true' }} + uses: splunk/pypi-publish-action@v1.0 + with: + pypi_username: ${{ secrets.PYPI_USERNAME }} + pypi_token: ${{ secrets.PYPI_TOKEN }} + \ No newline at end of file diff --git a/.github/workflows/sr-prepare.sh b/.github/workflows/sr-prepare.sh deleted file mode 100755 index 26a00b061..000000000 --- a/.github/workflows/sr-prepare.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -set -eE -set -v -poetry build \ No newline at end of file diff --git a/.github/workflows/sr-release.sh b/.github/workflows/sr-release.sh deleted file mode 100755 index e7f2ad4c7..000000000 --- a/.github/workflows/sr-release.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -set -eE -set -v -echo pypy user=${PYPI_USERNAME} -poetry publish -n -u ${PYPI_USERNAME} -p ${PYPI_TOKEN} \ No newline at end of file diff --git a/.releaserc b/.releaserc index 72c62f878..f58279c18 100644 --- a/.releaserc +++ b/.releaserc @@ -62,9 +62,6 @@ [ "@semantic-release/exec", { - "prepareCmd": "./.github/workflows/sr-prepare.sh ${nextRelease.version}", - "publishCmd": "./.github/workflows/sr-release.sh", - "shell": "bash", "verifyReleaseCmd": "echo \"version=${nextRelease.version}\" >> $GITHUB_OUTPUT", "successCmd": "echo \"new_release_published=${'true'}\" >> $GITHUB_OUTPUT" },