Skip to content

Commit

Permalink
ci(PythonSematicRelease): update python semantic release to v8
Browse files Browse the repository at this point in the history
  • Loading branch information
Oli4 committed Sep 27, 2023
1 parent 08abc52 commit 2a50002
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,34 @@ name: Semantic Release

on:
workflow_call:
secrets:
PYPI_PASSWORD:
required: true

jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write

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

- name: Python Semantic Release
uses: relekang/python-semantic-release@master
id: release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
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 }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_PASSWORD }}
2 changes: 0 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ jobs:
Release:
if: github.repository == 'MedVisBonn/eyeseg'
uses: MedVisBonn/eyeseg/.github/workflows/_release.yaml@main
secrets:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ build-backend = "poetry.core.masonry.api"
branch = "main"
major_on_zero = true
version_variable = ['eyeseg/__init__.py:__version__']
version_toml = "pyproject.toml:tool.poetry.version"
version_toml = ["pyproject.toml:tool.poetry.version"]
version_pattern = ["CITATION.cff:v(\\d+\\.\\d+\\.\\d+)", "docker/Makefile:(\\d+\\.\\d+\\.\\d+)", "README.md:(\\d+\\.\\d+\\.\\d+)"]
upload_to_pypi = true
upload_to_release = true
Expand Down

0 comments on commit 2a50002

Please sign in to comment.