Skip to content

Commit dd8e9b2

Browse files
AddonoCopilot
andcommitted
feat: configure npm publishing to GitHub Packages registry
- Scope package name to @addono/gh-attach for GitHub Packages compatibility - Add @semantic-release/npm plugin to .releaserc.json - Add publishConfig with GitHub Packages registry URL - Add packages:write permission and NODE_AUTH_TOKEN to release workflow - Configure registry-url in setup-node step - Update README install instructions for scoped package Closes #17 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a8f7d97 commit dd8e9b2

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
permissions:
88
contents: write
99
issues: write
10+
packages: write
1011

1112
jobs:
1213
release:
@@ -20,6 +21,7 @@ jobs:
2021
with:
2122
node-version: 22
2223
cache: npm
24+
registry-url: https://npm.pkg.github.com
2325
- run: npm ci
2426
- run: npm run build
2527
- run: npm test
@@ -28,3 +30,5 @@ jobs:
2830
run: npx semantic-release
2931
env:
3032
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"changelogFile": "CHANGELOG.md"
1010
}
1111
],
12+
"@semantic-release/npm",
1213
[
1314
"@semantic-release/github",
1415
{

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ GitHub doesn't provide an official API for attaching images to issues and pull r
2222
## Install
2323

2424
```bash
25-
# npm (standalone)
26-
npm install -g gh-attach
25+
# npm (standalone, from GitHub Packages)
26+
npm install -g @addono/gh-attach --registry=https://npm.pkg.github.com
2727

2828
# gh extension
2929
gh extension install Addono/gh-attach

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "gh-attach",
2+
"name": "@addono/gh-attach",
33
"version": "0.0.0-development",
44
"description": "CLI tool and MCP server for attaching images to GitHub issues, PRs, and comments",
55
"type": "module",
@@ -68,6 +68,9 @@
6868
"type": "git",
6969
"url": "https://github.com/Addono/gh-attach.git"
7070
},
71+
"publishConfig": {
72+
"registry": "https://npm.pkg.github.com"
73+
},
7174
"engines": {
7275
"node": ">=20"
7376
},

0 commit comments

Comments
 (0)