From 844c6b07b8b4f91b4a45df0a1ddcd4fd81011fa0 Mon Sep 17 00:00:00 2001 From: Bill Fienberg Date: Tue, 20 May 2025 16:28:17 -0500 Subject: [PATCH 1/2] add release npm script --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index a372e36..d91e194 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "lint:fix": "prettier --write --ignore-unknown .", "lint": "prettier --check --cache --ignore-unknown .", "inspector": "npm run build && npm exec @modelcontextprotocol/inspector dist/index.js", + "release": "changeset publish", "typecheck": "tsc --noEmit" }, "author": "", From 68feaeaa9d3719dd5cba13da85089512eda2dc22 Mon Sep 17 00:00:00 2001 From: Bill Fienberg Date: Tue, 20 May 2025 16:29:32 -0500 Subject: [PATCH 2/2] add release workflow --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d317421 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/setup-node@v3 + name: Setup node.js + with: + cache: npm + node-version-file: ".nvmrc" + + - name: Install dependencies + run: npm ci + shell: bash + + - name: Build + run: npm run build + + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + publish: npm run release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}