Skip to content

Commit

Permalink
feat: publish only on new tags
Browse files Browse the repository at this point in the history
  • Loading branch information
cafadev committed Oct 12, 2023
1 parent 697dd2a commit 315bc8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 315bc8c

Please sign in to comment.