Skip to content

fix: ci

fix: ci #5

Workflow file for this run

name: Release

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 15, Col: 14): Unexpected value '', (Line: 16, Col: 9): Unexpected value 'ref'
on:
release:
types: [published]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Lint
run: bun run lint
- name: Build
run: bun run build
- name: Prevent duplicate publish
run: |
if npm view opencode-notification@$(node -p "require('./package.json').version") version; then
echo "Version already published"
exit 1
fi
- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}