Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ concurrency:

jobs:
release-please:
# Release PRs squash to this prefix. Skip that push so release.yml can create
# the tag before the next conventional commit or manual dispatch scans again.
if: >-
${{
github.event_name == 'workflow_dispatch' ||
!startsWith(github.event.head_commit.message, 'chore(release): v')
}}
runs-on: ubuntu-latest
timeout-minutes: 10
env:
Expand Down
10 changes: 10 additions & 0 deletions scripts/test_release_please_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ def test_release_please_workflow_is_pr_only_and_staged() -> None:
assert "if: ${{ env.RELEASE_PLEASE_TOKEN != '' }}" in workflow
assert "if: ${{ env.RELEASE_PLEASE_TOKEN == '' }}" in workflow

release_commit_guard = """\
if: >-
${{
github.event_name == 'workflow_dispatch' ||
!startsWith(github.event.head_commit.message, 'chore(release): v')
}}
"""
release_job = workflow[workflow.index(" release-please:\n") :]
assert release_commit_guard in release_job

release_workflow = (ROOT / ".github/workflows/release.yml").read_text()
assert "predates scripts/release_changelog_section.py" in release_workflow
assert "python3 scripts/release_changelog_section.py" not in release_workflow
Expand Down