Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/publish-mcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Create and publish MCP package and container image
on:
push:
tags:
- "v*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: nulib/dc-api-mcp
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org/"
- run: npm ci
working-directory: ./mcp
- name: Publish to npm
run: npm publish --provenance --access public
working-directory: ./mcp
publish-oci:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v5
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push the Docker image
uses: docker/build-push-action@v7
with:
context: ./mcp
push: true
tags: ${{ steps.meta.outputs.tags }}
- name: Generate artifact attestation
uses: actions/attest@v4
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.meta.outputs.digest }}
push-to-registry: true
publish-registry:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v5
- name: Install mcp-publisher
run: |
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
- name: Authenticate to MCP Registry
run: ./mcp-publisher login github-oidc
- name: Publish server to MCP Registry
run: ./mcp-publisher publish
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,10 @@ version:
echo "Bumping version in $$pkg: " >&2 ; \
(cd $$pkg && uv version --bump $(BUMP)) >&2; \
done; \
VERSION=$$(node -p "require('./api/src/package.json').version") ;\
(cd mcp && \
jq --arg v "$$VERSION" '(.. | objects | select(has("version")) | .version) |= $$v' server.json > server.tmp.json && \
mv server.tmp.json server.json && \
sed -i -E "s|\"ghcr\.io/nulib/dc-api-mcp:[^\"]+\"|\"ghcr.io/nulib/dc-api-mcp:$$VERSION\"|g" server.json) >&2 ;\
fi; \
node -e 'console.log(require("./api/package.json").version)'
4 changes: 2 additions & 2 deletions api/dependencies/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/dependencies/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "dc-api-dependencies",
"version": "2.10.1",
"version": "2.10.4",
"description": "NUL Digital Collections API Dependencies",
"repository": "https://github.com/nulib/dc-api-v2",
"author": "nulib",
"license": "Apache-2.0",
"license": "MIT",
"dependencies": {
"@aws-crypto/sha256-browser": "^2.0.1",
"@aws-sdk/client-sfn": "^3.563.0",
Expand Down
4 changes: 2 additions & 2 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "dc-api-build",
"version": "2.10.1",
"version": "2.10.4",
"description": "NUL Digital Collections API Build Environment",
"repository": "https://github.com/nulib/dc-api-v2",
"author": "nulib",
"license": "Apache-2.0",
"license": "MIT",
"dependencies": {
"dc-api": "file:./src"
},
Expand Down
4 changes: 2 additions & 2 deletions api/src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/src/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "dc-api",
"version": "2.10.1",
"version": "2.10.4",
"description": "NUL Digital Collections API",
"repository": "https://github.com/nulib/dc-api-v2",
"author": "nulib",
"license": "Apache-2.0",
"license": "MIT",
"dependencies": {
"@aws-crypto/sha256-browser": "^2.0.1",
"@aws-sdk/client-s3": "^3.565.0",
Expand Down
11 changes: 6 additions & 5 deletions api/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ Parameters:
Description: URL of Digital Collections website
DeployAPI:
Type: String
Description: Whether to deploy all the API functions or only the ones required for other stacks
Description: Whether to deploy all the API functions or only the ones required
for other stacks
DeployAVDownload:
Type: String
Description: Set to true to deploy AVDownload
Expand Down Expand Up @@ -122,11 +123,11 @@ Conditions:
- !Ref ApiConfigPrefix
- ""
DeployAPI:
Fn::Equals: [!Ref DeployAPI, "true"]
Fn::Equals: [ !Ref DeployAPI, "true" ]
DeployAVDownload:
Fn::Equals: [!Ref DeployAVDownload, "true"]
Fn::Equals: [ !Ref DeployAVDownload, "true" ]
DeployChat:
Fn::Equals: [!Ref DeployChat, "true"]
Fn::Equals: [ !Ref DeployChat, "true" ]
WriteSecret:
Fn::Equals:
- !Ref WriteConfigSecret
Expand All @@ -140,7 +141,7 @@ Resources:
#* ContentUri: ./dependencies
#* CompatibleRuntimes:
#* - nodejs20.x
#* LicenseInfo: Apache-2.0
#* LicenseInfo: MIT
#* Metadata:
#* BuildMethod: nodejs20.x
# Configuration
Expand Down
4 changes: 2 additions & 2 deletions av-download/lambdas/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions av-download/lambdas/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "lambdas",
"version": "2.10.1",
"version": "2.10.4",
"description": "Non-API handler lambdas",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "nulib",
"license": "Apache-2.0",
"license": "MIT",
"devDependencies": {
"@aws-sdk/client-mediaconvert": "^3.410.0",
"@aws-sdk/client-s3": "^3.410.0",
Expand Down
2 changes: 1 addition & 1 deletion chat/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "dc-api-v2-chat"
version = "2.10.1"
version = "2.10.4"
requires-python = ">=3.12"
dependencies = [
"boto3~=1.34",
Expand Down
Loading
Loading