Skip to content

Commit f6c8514

Browse files
committed
chore(release): prepare 0.1.1-beta.0 prerelease
1 parent c087a57 commit f6c8514

5 files changed

Lines changed: 48 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,33 @@ jobs:
2121
cache: npm
2222
- run: npm ci
2323
- run: npm test
24-
- run: npm publish --provenance
24+
- name: Derive release metadata
25+
id: meta
26+
shell: bash
27+
run: |
28+
version="${GITHUB_REF_NAME#v}"
29+
if [[ "$version" == *-* ]]; then
30+
prerelease_part="${version#*-}"
31+
dist_tag="${prerelease_part%%.*}"
32+
echo "prerelease=true" >> "$GITHUB_OUTPUT"
33+
else
34+
dist_tag="latest"
35+
echo "prerelease=false" >> "$GITHUB_OUTPUT"
36+
fi
37+
echo "version=$version" >> "$GITHUB_OUTPUT"
38+
echo "dist_tag=$dist_tag" >> "$GITHUB_OUTPUT"
39+
- name: Ensure tag matches package version
40+
shell: bash
41+
run: |
42+
package_version=$(node -p "JSON.parse(require('node:fs').readFileSync('package.json', 'utf8')).version")
43+
if [[ "$package_version" != "${{ steps.meta.outputs.version }}" ]]; then
44+
echo "Tag version ${{ steps.meta.outputs.version }} does not match package.json version $package_version" >&2
45+
exit 1
46+
fi
47+
- run: npm publish --tag "${{ steps.meta.outputs.dist_tag }}" --provenance
2548
env:
2649
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2750
- uses: softprops/action-gh-release@v2
2851
with:
2952
generate_release_notes: true
53+
prerelease: ${{ steps.meta.outputs.prerelease }}

CHANGELOG.md

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

3+
## 0.1.1-beta.0
4+
5+
- mark the package as an explicit prerelease line
6+
- publish prereleases to the npm `beta` dist-tag instead of `latest`
7+
- document OpenCode installation via `opencode-planner@beta`
8+
39
## 0.1.0
410

511
- initial standalone npm package for the `plan` agent plugin

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# opencode-planner
22

3-
`opencode-planner` is an OpenCode plugin that adds a dedicated `plan` agent for read-only planning before implementation.
3+
`opencode-planner` is an experimental OpenCode plugin that adds a dedicated `plan` agent for read-only planning before implementation.
44

55
Repository: <https://github.com/timrichardson/opencode-planner>
66

@@ -10,17 +10,19 @@ Add this to `opencode.json`:
1010

1111
```json
1212
{
13-
"plugin": ["opencode-planner@latest"]
13+
"plugin": ["opencode-planner@beta"]
1414
}
1515
```
1616

1717
Then restart OpenCode.
1818

19+
`beta` is the recommended install channel until the package has a stable release. This keeps prereleases off `latest`.
20+
1921
If you want reproducible installs instead of automatic plugin refreshes, pin an exact version:
2022

2123
```json
2224
{
23-
"plugin": ["opencode-planner@0.1.0"]
25+
"plugin": ["opencode-planner@0.1.1-beta.0"]
2426
}
2527
```
2628

@@ -32,9 +34,12 @@ If you want reproducible installs instead of automatic plugin refreshes, pin an
3234

3335
## Auto-updates
3436

35-
OpenCode installs npm plugins automatically. Using `opencode-planner@latest` gives the smoothest update path for most users.
37+
OpenCode installs npm plugins automatically. During the prerelease phase, `opencode-planner@beta` gives the smoothest update path for most users.
38+
39+
For this package's current prerelease phase, use `opencode-planner@beta` instead of `@latest`.
3640

37-
- `@latest`: pick up new published plugin versions on restart
41+
- `@beta`: pick up new prerelease plugin versions on restart without opting into a future stable channel
42+
- `@latest`: reserved for stable releases
3843
- exact version pin: stay fixed until the config is changed deliberately
3944

4045
If OpenCode appears to keep an older cached plugin, clear the cache under `~/.cache/opencode/` and restart.
@@ -50,8 +55,8 @@ npm test
5055
1. Update `CHANGELOG.md`.
5156
2. Bump the version in `package.json`.
5257
3. Commit the release.
53-
4. Create and push a git tag like `v0.1.1`.
54-
5. Publish to npm.
58+
4. Create and push a git tag like `v0.1.1-beta.0` for prereleases or `v0.1.1` for stable releases.
59+
5. Let GitHub Actions publish to npm using the correct dist-tag.
5560
6. Publish matching GitHub release notes.
5661

5762
The repository includes GitHub Actions templates for CI and npm publishing from version tags.
@@ -62,7 +67,7 @@ Set this repository secret for automated npm publishing:
6267

6368
- `NPM_TOKEN`
6469

65-
The release workflow publishes on version tags like `v0.1.0` and creates GitHub release notes automatically.
70+
The release workflow publishes prerelease tags like `v0.1.1-beta.0` to the npm `beta` dist-tag, stable tags like `v0.1.1` to `latest`, and creates matching GitHub release notes automatically.
6671

6772
## License
6873

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "opencode-planner",
3-
"version": "0.1.0",
4-
"description": "OpenCode plugin that adds a dedicated planning agent with read-only planning constraints.",
3+
"version": "0.1.1-beta.0",
4+
"description": "Experimental OpenCode plugin that adds a dedicated planning agent with read-only planning constraints.",
55
"type": "module",
66
"author": "Tim Richardson",
77
"exports": {

0 commit comments

Comments
 (0)