diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 39b2ef7..916c76c 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -26,7 +26,7 @@ jobs: id: versioning uses: python-semantic-release/python-semantic-release@master with: - github_token: $${{ secrets.GHA_TOKEN }} + github_token: ${{ secrets.GHA_TOKEN }} - name: Publish package distributions to GitHub Releases uses: python-semantic-release/upload-to-gh-release@main diff --git a/pyproject.toml b/pyproject.toml index 42a8cfa..645c66f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,18 +64,23 @@ profile = "black" line_length = 99 [tool.semantic_release] -version_source = "commit" # source for version -version_variable = [ # version location(s) - "pyproject.toml:version", # in this pyproject.toml - "stimupy/__init__.py:__version__" # in the init.py, so that stimupy.__version__ works +commit_message = "v{version}\n\nThis commit was automatically generated by python-semantic-release" +major_on_zero = true +tag_format = "v{version}" +version_variables = [ # version location(s) + "stimupy/__init__.py:__version__", # in the init.py, so that stimupy.__version__ works + "pyproject.toml:version", # in this pyproject.toml ] -major_on_zero = true # don't auto-bump to v1.0.0 yet -patch_without_tag = false # if nothing triggers a patch, bump? -commit_version_number = true # commit changes to version number? -commit_subject = "v{version}" +build_command = "pip3 install --upgrade build; python3 -m build" -branch = "main" # build dists (only) from "main" branch -build_command = "pipx run build" # use PyPAs build to generate distribution packages (sdist, wheel) -upload_to_release = true # upload sdist, wheel to release-tag -upload_to_pypi = false # don't auto-upload to PyPI, we'll separately -remove_dist = false # don't remove dist packages -- need those to upload \ No newline at end of file +[tool.semantic_release.branches.main] +match = "(main|master|build_.*)" +prerelease_token = "rc" +prerelease = false + +[tool.semantic_release.remote] +name = "origin" +type = "github" + +[tool.semantic_release.publish] +upload_to_vcs_release = true # upload sdist, wheel to release-tag