Skip to content

Commit 3259892

Browse files
refactor(ci): collapse to single release workflow, skip pr.yml on release-please PRs (#18)
refactor(ci): collapse to single release workflow, skip pr.yml on release-please PRs - Delete `ci.yml` and fold its responsibilities into a single manifest-mode `release.yml` (release-please opens the release PR and cuts the release in one coherent run; `build-release-binary` gated on `release_created`; no main build-test job — pr.yml gates merges). - `pr.yml` uses `paths-ignore` on the version/changelog files so it does not trigger on release-please's bot PRs, avoiding the GITHUB_TOKEN approval-required prompt.
1 parent 96b045d commit 3259892

3 files changed

Lines changed: 15 additions & 60 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/pr.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
name: PR Quality Gate
22

3+
# Skip release-please's bot-authored release PRs entirely: they only touch
4+
# version/changelog files, so paths-ignore prevents the workflow from
5+
# triggering at all — which avoids the approval-required run that
6+
# GITHUB_TOKEN-created PRs otherwise sit in.
37
on:
48
pull_request:
59
branches: [main, release-please-refactor]
10+
paths-ignore:
11+
- 'CHANGELOG.md'
12+
- '.release-please-manifest.json'
13+
- 'Cargo.toml'
14+
- 'Cargo.lock'
15+
- 'crates/**/Cargo.toml'
16+
- 'crates/**/CHANGELOG.md'
617

718
concurrency:
819
group: ${{ github.workflow }}-${{ github.ref }}
920
cancel-in-progress: true
1021

1122
jobs:
1223
lint:
13-
if: ${{ !startsWith(github.head_ref, 'release-please--branches--') }}
1424
runs-on: ubuntu-latest
1525

1626
steps:
@@ -29,7 +39,6 @@ jobs:
2939
run: cargo clippy --workspace --all-targets -- -D warnings
3040

3141
test:
32-
if: ${{ !startsWith(github.head_ref, 'release-please--branches--') }}
3342
runs-on: ${{ matrix.os }}
3443
strategy:
3544
matrix:

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Release
22

3-
# Cut a release only when release-please's manifest changes — i.e. a
4-
# release-please release PR was merged. The manifest is touched only by
5-
# release-please, only when a release is cut.
3+
# release-please in manifest mode: on each push it opens/maintains the release
4+
# PR; when that PR is merged, it cuts the tag + GitHub Release and the binary
5+
# build runs. There is intentionally no build/test job here -- pr.yml already
6+
# gates every merge, so main is trusted.
67
on:
78
push:
89
branches: [main, release-please-refactor]
9-
paths: ['.release-please-manifest.json']
1010

1111
permissions:
1212
contents: write
@@ -28,7 +28,6 @@ jobs:
2828
with:
2929
config-file: .release-please-config.json
3030
target-branch: release-please-refactor
31-
skip-github-pull-request: true
3231

3332
build-release-binary:
3433
needs: release-please

0 commit comments

Comments
 (0)