Skip to content

Commit

Permalink
Only publish a release when main is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseTG committed May 31, 2024
1 parent c3021ea commit 897aee4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ jobs:

- name: Publish to PyPI
uses: pypa/[email protected]
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version && github.event_name == 'push' && github.ref == 'refs/heads/main' }}"

- name: Create Release
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version && github.event_name == 'push' && github.ref == 'refs/heads/main'}}"
uses: softprops/[email protected]
with:
token: ${{ secrets.RELEASE_TOKEN }}
Expand Down

0 comments on commit 897aee4

Please sign in to comment.