From 315bc8c5633d2d396355f9f170f8ce5b6cd7b430 Mon Sep 17 00:00:00 2001 From: "Christopher A. Flores" Date: Wed, 11 Oct 2023 18:57:15 -0600 Subject: [PATCH] feat: publish only on new tags --- .github/workflows/pre-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 891dbe7..4edec95 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -60,8 +60,11 @@ jobs: uses: "WyriHaximus/github-action-get-previous-tag@v1" pypi-publish: + if: ${{ needs.build.outputs.fromTag != needs.build.outputs.toTag }} name: Upload release to PyPI runs-on: ubuntu-latest + needs: + - build environment: name: pypi url: https://pypi.org/p/turbobus @@ -78,10 +81,11 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 generate-release: + if: ${{ needs.build.outputs.fromTag != needs.build.outputs.toTag }} runs-on: ubuntu-latest needs: - build - if: ${{ needs.build.outputs.fromTag != needs.build.outputs.toTag }} + - pypi-publish steps: - name: checkout code repository uses: actions/checkout@v3