-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix release workflow (#125) fix: fix release workflow
- Loading branch information
Showing
1 changed file
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} |