Skip to content

Commit

Permalink
fix: fix release workflow (#126)
Browse files Browse the repository at this point in the history
fix: fix release workflow (#125)

fix: fix release workflow
  • Loading branch information
Ernst79 authored Jun 7, 2024
1 parent bbef3a7 commit 4d985e9
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,43 @@ jobs:
release:
runs-on: ubuntu-latest
environment: release

permissions:
id-token: write

if: github.ref == 'refs/heads/main'
needs:
- test
- lint
- commitlint

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Run semantic release:
# - Update CHANGELOG.md
# - Update version in code
# - Create git tag
# - Create GitHub release
# - Publish to PyPI
- name: Python Semantic Release
id: release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1
if: steps.release.outputs.released == 'true'

- name: Publish package to GitHub Release
uses: python-semantic-release/[email protected]
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1
if: steps.release.outputs.released == 'true'

- name: Publish package to GitHub Release
uses: python-semantic-release/[email protected]
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}

0 comments on commit 4d985e9

Please sign in to comment.