feat: auto-start the provider from an OpenCode plugin (setup installs… #30
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish npm | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| - "v[0-9]+.[0-9]+.[0-9]+-*" | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: "Dry run only (no upload)" | |
| required: false | |
| default: "false" | |
| type: choice | |
| options: | |
| - "false" | |
| - "true" | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| name: Publish @doeixd/opencode-ralph-rlm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build packages | |
| run: | | |
| bun --cwd=packages/engine run build | |
| bun --cwd=packages/worker-plugin run build | |
| bun --cwd=packages/provider run build | |
| bun build .opencode/plugins-legacy/ralph-rlm.ts \ | |
| --outfile dist/ralph-rlm.js \ | |
| --target bun \ | |
| --format esm \ | |
| --external @opencode-ai/plugin | |
| - name: Publish to npm | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.dry_run }}" = "true" ]; then | |
| bun run bin/publish-npm.ts --dry-run | |
| else | |
| bun run bin/publish-npm.ts | |
| fi |