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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets).

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/tiny-buses-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'opencode-posthog': minor
---

Add Changesets-based versioning, changelog generation, and automated GitHub releases for npm publishing.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
branches: [main]
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org
package-manager-cache: false

- name: Setup environment
uses: ./.github/actions/setup

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
publish: bun run release
commit: Version packages
title: Version packages
env:
GITHUB_TOKEN: ${{ github.token }}
NPM_CONFIG_PROVENANCE: true
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ Place the plugin source in your project's `.opencode/plugins/` directory (or `~/
}
```

## Releasing

For publishable changes, add a changeset with:

```sh
bun run changeset
```

Merges to `main` open or update a Changesets release pull request with the pending version and changelog updates. Merging that release pull request publishes the package to npm and creates a GitHub release.

Routine CI, config, or docs-only changes do not need a changeset unless a maintainer decides they should be released. This repo does not add PR-level changeset enforcement.

## Configuration

All configuration is via environment variables:
Expand Down
189 changes: 189 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
"homepage": "https://github.com/Quantumlyy/opencode-posthog#readme",
"scripts": {
"build": "bun build src/index.ts --outdir dist --target node",
"changeset": "changeset",
"prepublishOnly": "bun run build",
"release": "changeset publish",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit",
Expand All @@ -51,6 +53,7 @@
"@opencode-ai/plugin": "*"
},
"devDependencies": {
"@changesets/cli": "^2.30.0",
"@opencode-ai/plugin": "*",
"@opencode-ai/sdk": "*",
"@types/bun": "^1.3.0",
Expand Down
Loading