Skip to content

Commit f45f35e

Browse files
Add publish
1 parent 5160853 commit f45f35e

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
1-
name: Publish Package
1+
name: Publish package to GitHub Packages
22

33
on:
44
release:
5-
types: [created]
6-
workflow_dispatch:
5+
types: [published]
76

87
jobs:
9-
publish:
8+
build:
109
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
1113

1214
steps:
13-
- uses: actions/checkout@v3
14-
15-
- name: Use Node.js
16-
uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
# Setup .npmrc file to publish to GitHub Packages
17+
- uses: actions/setup-node@v4
1718
with:
1819
node-version: '20.x'
19-
registry-url: 'https://registry.npmjs.org'
20-
21-
- name: Install dependencies
22-
run: npm ci
23-
24-
- name: Build
25-
run: npm run build
26-
27-
- name: Publish to NPM
28-
run: npm publish
20+
registry-url: 'https://npm.pkg.github.com'
21+
# Defaults to the user or organization that owns the workflow file
22+
scope: '@${{ github.repository_owner }}'
23+
- run: npm ci
24+
- run: npm publish
2925
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
],
2424
"author": "",
2525
"license": "MIT",
26+
"publishConfig": {
27+
"registry": "https://npm.pkg.github.com"
28+
},
29+
"repository": {
30+
"type": "git",
31+
"url": "git+https://github.com/ProgramComputer/NASA-MCP-server.git"
32+
},
2633
"dependencies": {
2734
"@anthropic-ai/sdk": "",
2835
"@modelcontextprotocol/sdk": "^1.6.1",

0 commit comments

Comments
 (0)