Skip to content

Commit

Permalink
chore: only publish on new release
Browse files Browse the repository at this point in the history
  • Loading branch information
BPR02 committed Nov 21, 2024
1 parent b1d1d6b commit f13ec64
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,24 @@ jobs:
poetry run black --check beet_observer
poetry run isort --check-only beet_observer
- name: Release
id: release
if: |
github.repository == 'BPR02/Observer'
&& github.event_name == 'push'
&& github.ref == 'refs/heads/main'
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "[email protected]"
- name: Publish
if: steps.release.outputs.released == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
poetry run semantic-release version
poetry run twine upload --verbose dist/*
poetry run semantic-release publish

0 comments on commit f13ec64

Please sign in to comment.