Skip to content

Commit

Permalink
Update semantic-release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
yambottle authored Feb 17, 2025
1 parent 71315d1 commit ec4e48d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ jobs:
id: find_version_dot_py
run: |
echo "version_dot_py_path=$(find * -name "version.py" | head -n 1)" >> $GITHUB_OUTPUT
- name: Find pyproject.toml
id: find_pyproject_toml
run: |
echo "pyproject_toml_path=$(find * -name "pyproject.toml" | head -n 1)" >> $GITHUB_OUTPUT
- name: Config python-semantic-release
env:
VERSION_DOT_PY_PATH: ${{ steps.find_version_dot_py.outputs.version_dot_py_path }}
PYPROJECT_TOML_PATH: ${{ steps.find_pyproject_toml.outputs.pyproject_toml_path }}
run: |
cat <<EOF > .semantic-release.toml
[tool.semantic_release]
Expand All @@ -48,7 +53,9 @@ jobs:
version_variables = [
"${VERSION_DOT_PY_PATH}:__version__" #
]
version_toml = []
version_toml = [
"${PYPROJECT_TOML}:project.version:nf" #
]
[tool.semantic_release.branches.main]
match = "(main|master)"
Expand All @@ -63,7 +70,7 @@ jobs:
# have to add more slash to escape github actions auto escape...
"^(build|chore|ci|style|test)(\\\\(.*\\\\))?:.*" #
]
mode = "init"
mode = "update"
insertion_flag = "<!-- version list -->"
[tool.semantic_release.changelog.default_templates]
Expand Down

0 comments on commit ec4e48d

Please sign in to comment.