Skip to content

Commit

Permalink
build: update python-semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
francescopisu committed Sep 24, 2023
1 parent 57d8381 commit 214ff7e
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 172 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,18 @@ jobs:
run: poetry install

- name: Use Python Semantic Release to prepare release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
poetry run semantic-release publish
id: release
uses: python-semantic-release/python-semantic-release@v8.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to TestPyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
if: steps.release.outputs.released == 'true'

- name: Test install from TestPyPI
run: |
Expand All @@ -93,4 +92,11 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
if: steps.release.outputs.released == 'true'

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 214ff7e

Please sign in to comment.