Skip to content

feat!: rename package to @devtheops/opencode-plugin-otel #7

feat!: rename package to @devtheops/opencode-plugin-otel

feat!: rename package to @devtheops/opencode-plugin-otel #7

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
id-token: write
jobs:
release:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22.14.0"
registry-url: "https://registry.npmjs.org"
- name: Update npm
run: npm install -g npm@latest
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Typecheck
run: bun run typecheck
- name: Test
run: bun test
- name: Publish to npm
run: npm publish --provenance --access public
- name: Extract changelog entry
id: changelog
run: |
VERSION="${GITHUB_REF_NAME#v}"
NOTES=$(awk "/^## \[${VERSION}\]/{found=1; next} found && /^## \[/{exit} found{print}" CHANGELOG.md)
NOTES="${NOTES}
---
📦 **npm:** https://www.npmjs.com/package/@devtheops/opencode-plugin-otel/v/${VERSION}"
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
echo "$NOTES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Create GitHub release
uses: actions/github-script@v7
with:
script: |
await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: context.ref.replace('refs/tags/', ''),
name: context.ref.replace('refs/tags/', ''),
body: process.env.RELEASE_NOTES,
draft: false,
prerelease: false,
})
env:
RELEASE_NOTES: ${{ steps.changelog.outputs.notes }}