diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2f9b761..3600451 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -62,10 +62,14 @@ jobs: if [[ -z "$TAG_NAME" || "$TAG_NAME" == "main" ]]; then TAG_NAME="v$(node -p "require('./package.json').version")" fi - gh release create "$TAG_NAME" \ - --title "Release $TAG_NAME" \ - --generate-notes \ - --draft=false + if gh release view "$TAG_NAME" &>/dev/null; then + echo "Release $TAG_NAME already exists; skipping release creation." + else + gh release create "$TAG_NAME" \ + --title "Release $TAG_NAME" \ + --generate-notes \ + --draft=false + fi publish-npm: name: Publish to npm @@ -136,4 +140,4 @@ jobs: pkg.name = `@${process.env.GITHUB_REPOSITORY_OWNER.toLowerCase()}/${baseName}`; fs.writeFileSync("package.json", JSON.stringify(pkg, null, 2) + "\n"); ' - npm publish --registry=https://npm.pkg.github.com + npm publish --registry=https://npm.pkg.github.com || echo "GitHub Packages: already published or skipped." diff --git a/package.json b/package.json index 1493820..d19f485 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,18 @@ { "name": "@utkarsh2325/git-context", - "version": "0.6.0", + "version": "0.6.1", "description": "Know your Git state from inside Node.js.", "publishConfig": { "access": "public" }, + "repository": { + "type": "git", + "url": "git+https://github.com/KDM-cli/git-context.git" + }, + "bugs": { + "url": "https://github.com/KDM-cli/git-context/issues" + }, + "homepage": "https://github.com/KDM-cli/git-context#readme", "keywords": [ "git", "context", diff --git a/src/cli.ts b/src/cli.ts index 23f4ebc..d6a24cf 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -134,7 +134,7 @@ function printUsage(): void { } function printVersion(): void { - process.stdout.write("0.6.0\n"); + process.stdout.write("0.6.1\n"); } // ────────────────────────────────────────────────────────────────────────