Skip to content

Commit d37efad

Browse files
Stop generating per-repository release guides. (#24)
1 parent 01d6c34 commit d37efad

9 files changed

Lines changed: 22 additions & 43 deletions

File tree

‎.github/releasing.md‎

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

‎context/getting-started.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bundle exec bake agent:context:install
1818
bundle exec bake gem:github:setup:plan
1919
```
2020

21-
Setup adds three release workflows, `config/release.yaml`, native ruleset payloads, and `.github/releasing.md`. Identical reruns do nothing; conflicting existing files stop before any file is written. Setup does not replace other publishers: remove conflicting release workflows during migration.
21+
Setup adds three release workflows, `config/release.yaml`, and native ruleset payloads. Identical reruns do nothing; conflicting existing files stop before any file is written. Setup does not replace other publishers: remove conflicting release workflows during migration.
2222

2323
To adopt template fixes after upgrading the gem, start from a clean working tree, edit `config/release.yaml` as needed, and regenerate:
2424

@@ -27,7 +27,7 @@ bundle exec bake gem:github:setup:update
2727
git diff
2828
```
2929

30-
The task updates the managed workflows, policy payloads, configuration formatting, and maintainer instructions directly in the working tree and returns the changed paths. It does not stage, commit, or change remote settings. An agent or maintainer can review the diff and selectively keep changes, restoring repository-specific customizations from Git where needed. Commit or stash existing edits first: generated files are replaced by the current templates. Repeating an update produces no further changes; intentionally retained customizations will appear in later update diffs. Apply remote rulesets after the corresponding workflows are running.
30+
The task updates the managed workflows, policy payloads, and configuration formatting directly in the working tree and returns the changed paths. It does not stage, commit, or change remote settings. An agent or maintainer can review the diff and selectively keep changes, restoring repository-specific customizations from Git where needed. Commit or stash existing edits first: generated files are replaced by the current templates. Repeating an update produces no further changes; intentionally retained customizations will appear in later update diffs. Apply remote rulesets after the corresponding workflows are running.
3131

3232
Release workflows follow `bake modernize` action versions and use moving major tags where upstream provides them. These tags receive upstream updates automatically; full commit hashes select fixed revisions. The RubyGems credentials action uses its [documented `@main` reference](https://github.com/rubygems/configure-rubygems-credentials#trusted-publisher-recommended), since upstream does not provide a moving major tag. Repositories that require fixed revisions can customize these references.
3333

‎guides/getting-started/readme.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bundle exec bake agent:context:install
1818
bundle exec bake gem:github:setup:plan
1919
```
2020

21-
Setup adds three release workflows, `config/release.yaml`, native ruleset payloads, and `.github/releasing.md`. Identical reruns do nothing; conflicting existing files stop before any file is written. Setup does not replace other publishers: remove conflicting release workflows during migration.
21+
Setup adds three release workflows, `config/release.yaml`, and native ruleset payloads. Identical reruns do nothing; conflicting existing files stop before any file is written. Setup does not replace other publishers: remove conflicting release workflows during migration.
2222

2323
To adopt template fixes after upgrading the gem, start from a clean working tree, edit `config/release.yaml` as needed, and regenerate:
2424

@@ -27,7 +27,7 @@ bundle exec bake gem:github:setup:update
2727
git diff
2828
```
2929

30-
The task updates the managed workflows, policy payloads, configuration formatting, and maintainer instructions directly in the working tree and returns the changed paths. It does not stage, commit, or change remote settings. An agent or maintainer can review the diff and selectively keep changes, restoring repository-specific customizations from Git where needed. Commit or stash existing edits first: generated files are replaced by the current templates. Repeating an update produces no further changes; intentionally retained customizations will appear in later update diffs. Apply remote rulesets after the corresponding workflows are running.
30+
The task updates the managed workflows, policy payloads, and configuration formatting directly in the working tree and returns the changed paths. It does not stage, commit, or change remote settings. An agent or maintainer can review the diff and selectively keep changes, restoring repository-specific customizations from Git where needed. Commit or stash existing edits first: generated files are replaced by the current templates. Repeating an update produces no further changes; intentionally retained customizations will appear in later update diffs. Apply remote rulesets after the corresponding workflows are running.
3131

3232
Release workflows follow `bake modernize` action versions and use moving major tags where upstream provides them. These tags receive upstream updates automatically; full commit hashes select fixed revisions. The RubyGems credentials action uses its [documented `@main` reference](https://github.com/rubygems/configure-rubygems-credentials#trusted-publisher-recommended), since upstream does not provide a moving major tag. Repositories that require fixed revisions can customize these references.
3333

‎lib/bake/gem/github/setup.rb‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def initialize(root)
1818
@root = File.expand_path(root)
1919
end
2020

21-
# Generate workflows, policy payloads, and maintainer instructions. Refuse conflicting existing files.
21+
# Generate workflows, policy payloads, and configuration. Refuse conflicting existing files.
2222
def generate(repository:, branch: "main", checks:, approvals: 2, signing: File.file?(File.join(@root, "release.cert")), ruby: "3.4")
2323
raise "Expected owner/repository." unless repository.match?(/\A[\w.-]+\/[\w.-]+\z/)
2424
raise "Unsupported branch name." unless branch.match?(/\A[\w.\/-]+\z/)
@@ -76,7 +76,6 @@ def render(config)
7676
self.class.rules(config).each do |name, rule|
7777
files[".github/release-rules/#{name}.json"] = JSON.pretty_generate(rule) + "\n"
7878
end
79-
files[".github/releasing.md"] = File.read(File.join(templates, "releasing.md"))
8079
files
8180
end
8281
end

‎readme.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,12 @@ Reviewed GitHub releases for Ruby gems, using `bake-gem` for branch preparation,
99

1010
Read [the setup, release and recovery guide](guides/getting-started/readme.md) before enabling publishing. Context is distributed through `agent-context`. This initial implementation requires `bake-gem` 0.15 or later and a live pilot before wider rollout.
1111

12-
For this gem's releases, follow [the maintainer instructions](.github/releasing.md). Release workflows use the source checkout through Bundler's `gemspec` dependency, so the first release does not require an already published copy of `bake-gem-github`.
12+
## Making Releases
13+
14+
To prepare a release branch and open a pull request from an up-to-date `main`:
15+
16+
``` bash
17+
$ bundle exec bake gem:github:release:patch # or minor or major
18+
```
19+
20+
See [bake-gem-github](https://github.com/socketry/bake-gem-github) for setup, remote releases, and recovery.

‎releases.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Releases
22

3+
## Unreleased
4+
5+
- Stop generating `.github/releasing.md`; release instructions are maintained in the shared guide and agent context.
6+
37
## v0.2.0
48

59
- Use only the version tag for GitHub release titles.

‎templates/releasing.md‎

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

‎test/bake/gem/github/setup.rb‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def generate
3232
it "generates three parseable workflows and idempotent native policy" do
3333
paths = generate
3434
expect(generate).to be == paths
35+
expect(File).not.to be(:exist?, File.join(root, ".github/releasing.md"))
3536
expect(paths.grep(/workflows/).size).to be == 3
3637
paths.grep(/workflows/).each do |path|
3738
workflow = YAML.safe_load_file(File.join(root, path))

‎test/bake/gem/github/setup/update.rb‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@
4040
end
4141

4242
it "restores missing generated files" do
43-
path = File.join(repository, ".github/releasing.md")
43+
path = File.join(repository, ".github/workflows/release-validate.yaml")
4444
original = File.read(path)
4545
File.unlink(path)
46-
expect(setup.update).to be == [".github/releasing.md"]
46+
expect(setup.update).to be == [".github/workflows/release-validate.yaml"]
4747
expect(File.read(path)).to be == original
4848
expect(setup.update).to be == []
49+
expect(File).not.to be(:exist?, File.join(repository, ".github/releasing.md"))
4950
end
5051

5152
it "refuses unsupported configuration schemas" do

0 commit comments

Comments
 (0)