From 05c7d3559549046f1162a57731f1e4073de2a800 Mon Sep 17 00:00:00 2001 From: Michael Latman Date: Tue, 26 Nov 2024 23:49:32 -0500 Subject: [PATCH] Bump version on push --- .github/workflows/publish.yml | 11 ++++++++++- package.json | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8005819..1fea90f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,11 +12,14 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Set up Node.js uses: actions/setup-node@v2 with: node-version: '14' + registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: npm install @@ -24,7 +27,13 @@ jobs: - name: Build project run: npm run build + - name: Bump version + run: | + npm version patch -m "chore: bump version to %s [skip ci]" + git push + git push --tags + - name: Publish to npm - run: npm publish + run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 901dee1..6cb46cb 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,11 @@ "test:install": "node --loader ts-node/esm src/index.ts install", "test:installed": "node --loader ts-node/esm src/index.ts installed", "extract": "node --loader ts-node/esm src/extractors/modelcontextprotocol-extractor.ts", - "test:uninstall": "node --loader ts-node/esm src/index.ts uninstall" + "test:uninstall": "node --loader ts-node/esm src/index.ts uninstall", + "version:patch": "npm version patch", + "version:minor": "npm version minor", + "version:major": "npm version major", + "publish:npm": "npm run build && npm publish --access public" }, "bin": { "mcp-get": "dist/index.js"