diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index fdc235b..9b4bb86 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -22,12 +22,54 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for PR message extraction + - uses: actions/setup-node@v4 with: node-version: 'latest' + + - name: Get PR Message + id: pr_message + run: | + PR_NUMBER=$(git log -1 --pretty=%B | grep -oP '#\K\d+' || echo "") + if [ ! -z "$PR_NUMBER" ]; then + PR_MESSAGE=$(gh pr view $PR_NUMBER --json body -q .body || echo "") + echo "message<> $GITHUB_OUTPUT + echo "$PR_MESSAGE" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + else + echo "message=No PR message found" >> $GITHUB_OUTPUT + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: npm ci - run: npm install -g tsx - - run: npm run build # Add build step here too - - uses: JS-DevTools/npm-publish@v3 + - run: npm run build + + - name: Publish to NPM + id: publish + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + + - name: Get package version + if: steps.publish.outputs.type != 'none' + id: package_version + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + if: steps.publish.outputs.type != 'none' + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + tag_name: v${{ steps.package_version.outputs.version }} + release_name: Release v${{ steps.package_version.outputs.version }} + body: | + ${{ steps.pr_message.outputs.message }} + + Package published to npm: ${{ steps.publish.outputs.version }} + draft: false + prerelease: false \ No newline at end of file diff --git a/index.ts b/index.ts index 8332761..c9918e6 100644 --- a/index.ts +++ b/index.ts @@ -10,7 +10,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprot const server = new Server( { name: "task-manager-server", - version: "1.0.8" + version: "1.0.9" }, { capabilities: { diff --git a/package-lock.json b/package-lock.json index 23ed788..a99e8bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "taskqueue-mcp", - "version": "1.0.8", + "version": "1.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "taskqueue-mcp", - "version": "1.0.8", + "version": "1.0.9", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.7.0", diff --git a/package.json b/package.json index 2ecf958..c95ed31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "taskqueue-mcp", - "version": "1.0.8", + "version": "1.0.9", "description": "Task Queue MCP Server", "author": "Christopher C. Smith (christopher.smith@promptlytechnologies.com)", "main": "dist/index.js",