diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c00b0a..6025a2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,23 +93,19 @@ jobs: - name: Type-check run: bunx tsc --noEmit - - - name: Verify npm supports trusted publishing + - name: Publish to npm run: | - NPM_VERSION=$(npm --version) - echo "npm version: $NPM_VERSION" - MAJOR=$(echo "$NPM_VERSION" | cut -d. -f1) - if [ "$MAJOR" -lt 11 ]; then - echo "::error::npm >= 11.5.1 required for trusted publishing (found $NPM_VERSION)" - exit 1 + npm publish --access public 2>&1 | tee /tmp/npm-publish.log + EXIT_CODE=${PIPESTATUS[0]} + if [ $EXIT_CODE -ne 0 ]; then + if grep -q "You cannot publish over the previously published versions" /tmp/npm-publish.log; then + echo "::warning::Version already published on npm — skipping" + else + cat /tmp/npm-publish.log + exit $EXIT_CODE + fi fi - - name: Clear .npmrc auth token (let npm use OIDC) - run: npm config delete //registry.npmjs.org/:_authToken || true - - - name: Publish to npm - run: npm publish --access public - - name: Push version bump to PR branch run: | git config user.name "github-actions[bot]" @@ -131,7 +127,8 @@ jobs: run: | gh pr merge ${{ github.event.pull_request.number }} \ --repo ${{ github.repository }} \ - --merge + --merge \ + --admin - name: Checkout main (post-merge) uses: actions/checkout@v4 diff --git a/package.json b/package.json index 56a6c7f..2a5255c 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,21 @@ { "name": "ecc2cursor", - "version": "0.0.1", + "version": "0.1.0", "description": "Sync Everything Claude Code (ECC) configs into Cursor IDE — rules, skills, agents, commands, and MCP servers. One command to supercharge your Cursor setup.", "type": "module", "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/cminn10/ecc2cursor" + }, "bin": { "ecc2cursor": "dist/cli.mjs" }, - "files": ["dist", "README.md", "LICENSE"], + "files": [ + "dist", + "README.md", + "LICENSE" + ], "keywords": [ "cursor", "cursor-ide",