Skip to content

docs + chore(release): 3.0.0 #11

docs + chore(release): 3.0.0

docs + chore(release): 3.0.0 #11

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: "24"
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.3.13
- name: Assert Node.js version
run: node -e "const v=+process.version.slice(1).split('.')[0]; if(v<22)process.exit(1)"
- name: Install dependencies
run: bun install --frozen-lockfile
- name: CI gate
run: bun run ci
- name: Unit tests with coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bun run test:coverage
- name: Create tarball for GitHub Release
id: pack
run: |
set -euo pipefail
npm pack
tarball=$(find . -maxdepth 1 -name 'rethunk-github-mcp-*.tgz' -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2-)
echo "tarball=${tarball#./}" >> "$GITHUB_OUTPUT"
- name: Publish to GitHub Packages (npm registry)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
node <<'NODE'
const fs = require("node:fs");
const p = JSON.parse(fs.readFileSync("package.json", "utf8"));
p.name = "@rethunk-ai/github-mcp";
p.publishConfig = {
registry: "https://npm.pkg.github.com",
access: "public",
};
fs.writeFileSync("package.json", JSON.stringify(p, null, 2) + "\n");
NODE
{
echo "@rethunk-ai:registry=https://npm.pkg.github.com"
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}"
} > .npmrc
npm publish --access public
- name: Create GitHub Release (official gh CLI, no third-party action)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
gh release create "${GITHUB_REF_NAME}" "${{ steps.pack.outputs.tarball }}" \
--verify-tag \
--generate-notes