Closed
Description
Hello,
I try to configure PSR to create pre-release when user create PR in draft (Deploy in sandbox without PSR) and send it to reviews.
But when i do this, my branch is not main and PSR skip creation with message :
Detached HEAD state cannot match any release groups; no release will be made
My pyproject.toml :
[tool.semantic_release]
assets = []
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
commit_parser = "angular"
logging_use_named_masks = false
major_on_zero = true
tag_format = "v{version}"
build_command = "echo 1"
version_toml = [
"pyproject.toml:tool.poetry.version",
]
commit_version_number = true
version_variables = [
"src/__version__.py:VERSION",
]
[tool.semantic_release.branches.main]
match = "main"
[tool.semantic_release.branches.other]
match = ".*"
prerelease_token = "rc"
prerelease = true
[tool.semantic_release.changelog]
#template_dir = "templates"
changelog_file = "CHANGELOG.md"
exclude_commit_patterns = []
[tool.semantic_release.changelog.environment]
block_start_string = "{%"
block_end_string = "%}"
variable_start_string = "{{"
variable_end_string = "}}"
comment_start_string = "{#"
comment_end_string = "#}"
trim_blocks = false
lstrip_blocks = false
newline_sequence = "\n"
keep_trailing_newline = false
extensions = []
autoescape = true
[tool.semantic_release.commit_author]
env = "GIT_COMMIT_AUTHOR"
default = "semantic-release <semantic-release>"
[tool.semantic_release.commit_parser_options]
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
[tool.semantic_release.remote]
name = "origin"
type = "github"
ignore_token_for_push = false
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true
My github action :
- name: Release
uses: python-semantic-release/python-semantic-release@v8.7.0
with:
directory: ./
github_token: ${{ secrets.GITHUB_TOKEN }}
push: true
Have you idea how to do this ?