Skip to content

0.3.7

0.3.7 #3

Workflow file for this run

name: Release binaries
on:
push:
tags:
- "v*"
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: npm ci
- run: npm run check
- run: npm run build:binaries
- name: Smoke test the native binary
run: |
chmod +x release-binaries/opencode-neuron-linux-x64
./release-binaries/opencode-neuron-linux-x64 --help | grep -q "opencode-neuron setup"
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" \
release-binaries/opencode-neuron-linux-x64 \
release-binaries/opencode-neuron-linux-arm64 \
release-binaries/opencode-neuron-darwin-x64 \
release-binaries/opencode-neuron-darwin-arm64 \
release-binaries/opencode-neuron-windows-x64.exe \
release-binaries/opencode-neuron-windows-arm64.exe \
--title "$GITHUB_REF_NAME" \
--generate-notes
- name: Update Scoop manifest
run: |
VERSION="${GITHUB_REF_NAME#v}"
REPO="Noser-Engineering/opencode-plugin-neuron"
HASH_X64=$(sha256sum release-binaries/opencode-neuron-windows-x64.exe | cut -d' ' -f1)
HASH_ARM64=$(sha256sum release-binaries/opencode-neuron-windows-arm64.exe | cut -d' ' -f1)
mkdir -p bucket
cat > bucket/opencode-neuron.json <<EOF
{
"version": "${VERSION}",
"description": "OpenCode plugin setup CLI for configurable LiteLLM proxies",
"homepage": "https://github.com/${REPO}",
"license": "MIT",
"architecture": {
"64bit": {
"url": "https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/opencode-neuron-windows-x64.exe#/opencode-neuron.exe",
"hash": "${HASH_X64}"
},
"arm64": {
"url": "https://github.com/${REPO}/releases/download/${GITHUB_REF_NAME}/opencode-neuron-windows-arm64.exe#/opencode-neuron.exe",
"hash": "${HASH_ARM64}"
}
},
"bin": "opencode-neuron.exe"
}
EOF
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add bucket/opencode-neuron.json
git diff --cached --quiet || git commit -m "Update Scoop manifest to ${VERSION}"
git pull --rebase origin main
git push origin HEAD:main