Skip to content

Commit

Permalink
chore: add workflow for publishing to npm registry
Browse files Browse the repository at this point in the history
  • Loading branch information
zxkane committed Dec 26, 2024
1 parent 2d3ef7f commit 6387183
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish to NPM

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"name": "mcp-server-amazon-bedrock",
"version": "0.1.0",
"description": "Use Amazon Bedrock models to generate text, image and videos",
"private": true,
"description": "Use Amazon Bedrock Nova models to generate image.",
"author": "Kane Zhu",
"type": "module",
"bin": {
"mcp-server-amazon-bedrock": "./build/index.js"
},
"files": [
"build"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
"prepare": "npm run build",
Expand Down

0 comments on commit 6387183

Please sign in to comment.