@@ -23,22 +23,28 @@ Nothing needs to be published to npm. `$HOME` expands to your home directory.
2323
2424## Install from a .tgz package
2525
26- 1 . Download/copy the archive to the machine running OpenCode 2 and install it
27- (replace ` VERSION ` with the downloaded version):
26+ Run this command on the machine running OpenCode 2:
2827
29- ``` bash
30- npm install --global --prefix " $HOME /.local" " $HOME /Downloads/opencode2-automation-VERSION.tgz"
31- ```
28+ <!-- latest-release:start -->
29+ Latest stable release: ** [ v0.6.2] ( https://github.com/d3cker/opencode2-github-automation/releases/tag/v0.6.2 ) ** .
3230
33- ` postinstall ` registers both the plugin and TUI automatically. No ` sudo ` ,
34- source checkout, or manual config editing is needed. Do not add
35- ` --ignore-scripts ` ; npm needs network access to install dependencies.
31+ [ Download the .tgz package] ( https://github.com/d3cker/opencode2-github-automation/releases/download/v0.6.2/opencode2-automation-0.6.2.tgz ) · [ SHA-256 checksum] ( https://github.com/d3cker/opencode2-github-automation/releases/download/v0.6.2/opencode2-automation-0.6.2.tgz.sha256 )
32+
33+ ``` bash
34+ npm install --global --prefix " $HOME /.local" " https://github.com/d3cker/opencode2-github-automation/releases/download/v0.6.2/opencode2-automation-0.6.2.tgz"
35+ ```
36+ <!-- latest-release:end -->
3637
37- 2 . Restart the service when its sessions are idle:
38+ ` postinstall ` registers both the plugin and TUI automatically. No ` sudo ` ,
39+ source checkout, or manual config editing is needed. Do not add
40+ ` --ignore-scripts ` ; npm needs network access to install dependencies.
41+ You can also download the archive and pass its local path to the same command.
3842
39- ``` bash
40- opencode2 service restart
41- ```
43+ Restart the service when its sessions are idle:
44+
45+ ``` bash
46+ opencode2 service restart
47+ ```
4248
4349The CLI is now at ` $HOME/.local/bin/opencode2-automation ` . If ` $HOME/.local/bin `
4450is on your PATH, you can use the shorter ` opencode2-automation ` command.
@@ -122,15 +128,13 @@ A reboot-only task does not handle later `opencode2 service restart` calls.
122128
123129## Update from a .tgz package
124130
125- Wait for active bot work to finish. Download the new archive, then:
126-
127- 1 . Install the new file using the ** same prefix** as before:
131+ Wait for active bot work to finish, then:
128132
129- ``` bash
130- npm install --global -- prefix " $HOME /.local " /absolute/path/to/opencode2-automation-NEW_VERSION.tgz
131- ```
133+ 1 . Run the versioned command in [ Install from a .tgz package ] ( #install-from-a-tgz-package )
134+ using the ** same prefix** as before. The README on the default branch links to
135+ the latest published stable package.
132136
133- Replace the example path with your archive. ` postinstall ` refreshes registration;
137+ ` postinstall ` refreshes registration;
134138 project settings and queues are preserved. Do not run ` init ` again.
135139
1361402 . Reload the service:
@@ -292,17 +296,35 @@ copy it to another machine and follow the `.tgz` instructions above.
292296- ** Releases:** push a SemVer tag to build and publish a GitHub Release with the
293297 ` .tgz ` and SHA-256 checksum. CI verifies that the tag matches the committed
294298 version in ` package.json ` and ` package-lock.json ` . Tests and package installation must pass.
299+ Release notes come from the exact version section in [ CHANGELOG.md] ( CHANGELOG.md )
300+ at that tag, independently of PR merge timing. Missing, duplicate, or empty
301+ version sections stop the release before publication.
295302
296- For a stable release, merge the PR first, then update your local ` main ` branch.
297- With a clean working tree, run (replace ` 0.6.0 ` with your next unused version):
303+ For a stable release, prepare a changelog section such as ` ## 0.6.3 ` with the
304+ changes for that version, merge the PR, then update your local ` main ` branch.
305+ With a clean working tree, run (replace ` 0.6.3 ` with your next unused version,
306+ matching the changelog heading):
298307
299308``` bash
300- npm version 0.6.0
301- git push --atomic origin HEAD v0.6.0
309+ npm version 0.6.3
310+ git push --atomic origin HEAD v0.6.3
302311```
303312
304313` npm version ` updates both manifests, creates a commit, and tags it automatically.
305314The push sends the current branch and tag together. For testing, use a version
306315such as ` 0.7.0-beta.1 ` on a feature branch; CI marks it as a prerelease.
307316CI does not rewrite versions or publish to npm. Releases use the built-in
308317` GITHUB_TOKEN ` ; no npm token or extra secret is needed.
318+
319+ After successful stable publication, the ** Update release download in README**
320+ workflow reads GitHub's latest stable release and checks that its archive and
321+ checksum are uploaded. It commits the versioned installation block to the current
322+ default branch. Prereleases do not trigger this update. A tag's README and the
323+ README inside an existing archive remain snapshots from their build.
324+
325+ The updater needs ` contents: write ` and branch rules that permit its README commit.
326+ It preserves content outside the marked block and retries conflicting edits using
327+ the current file. If this step fails, the release remains published; resolve the
328+ reported permission or content problem, then run ** Update release download in README**
329+ manually from Actions. The rerun selects the latest stable release again and does
330+ nothing if the README is already current. Do not rerun publication to repair a link.
0 commit comments