mirror of
https://github.com/containers/kubernetes-mcp-server.git
synced 2025-10-23 01:22:57 +03:00
feat(ci): update release configuration for npm publishing using OIDC (#381)
- https://github.blog/changelog/2025-09-29-strengthening-npm-security-important-changes-to-authentication-and-token-management/ - https://docs.npmjs.com/trusted-publishers Signed-off-by: Marc Nuri <marc@marcnuri.com>
This commit is contained in:
8
.github/workflows/release.yaml
vendored
8
.github/workflows/release.yaml
vendored
@@ -12,11 +12,11 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: 1.23
|
GO_VERSION: 1.23
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
|
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
id-token: write # Required for npmjs OIDC
|
||||||
discussions: write
|
discussions: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -39,6 +39,12 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
LICENSE
|
LICENSE
|
||||||
kubernetes-mcp-server-*
|
kubernetes-mcp-server-*
|
||||||
|
# Ensure npm 11.5.1 or later is installed (required for https://docs.npmjs.com/trusted-publishers)
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
- name: Publish npm
|
- name: Publish npm
|
||||||
run:
|
run:
|
||||||
make npm-publish
|
make npm-publish
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -71,16 +71,14 @@ npm-publish: npm-copy-binaries ## Publish the npm packages
|
|||||||
$(foreach os,$(OSES),$(foreach arch,$(ARCHS), \
|
$(foreach os,$(OSES),$(foreach arch,$(ARCHS), \
|
||||||
DIRNAME="$(BINARY_NAME)-$(os)-$(arch)"; \
|
DIRNAME="$(BINARY_NAME)-$(os)-$(arch)"; \
|
||||||
cd npm/$$DIRNAME; \
|
cd npm/$$DIRNAME; \
|
||||||
echo '//registry.npmjs.org/:_authToken=$(NPM_TOKEN)' >> .npmrc; \
|
|
||||||
jq '.version = "$(NPM_VERSION)"' package.json > tmp.json && mv tmp.json package.json; \
|
jq '.version = "$(NPM_VERSION)"' package.json > tmp.json && mv tmp.json package.json; \
|
||||||
npm publish; \
|
npm publish --tag latest; \
|
||||||
cd ../..; \
|
cd ../..; \
|
||||||
))
|
))
|
||||||
cp README.md LICENSE ./npm/kubernetes-mcp-server/
|
cp README.md LICENSE ./npm/kubernetes-mcp-server/
|
||||||
echo '//registry.npmjs.org/:_authToken=$(NPM_TOKEN)' >> ./npm/kubernetes-mcp-server/.npmrc
|
|
||||||
jq '.version = "$(NPM_VERSION)"' ./npm/kubernetes-mcp-server/package.json > tmp.json && mv tmp.json ./npm/kubernetes-mcp-server/package.json; \
|
jq '.version = "$(NPM_VERSION)"' ./npm/kubernetes-mcp-server/package.json > tmp.json && mv tmp.json ./npm/kubernetes-mcp-server/package.json; \
|
||||||
jq '.optionalDependencies |= with_entries(.value = "$(NPM_VERSION)")' ./npm/kubernetes-mcp-server/package.json > tmp.json && mv tmp.json ./npm/kubernetes-mcp-server/package.json; \
|
jq '.optionalDependencies |= with_entries(.value = "$(NPM_VERSION)")' ./npm/kubernetes-mcp-server/package.json > tmp.json && mv tmp.json ./npm/kubernetes-mcp-server/package.json; \
|
||||||
cd npm/kubernetes-mcp-server && npm publish
|
cd npm/kubernetes-mcp-server && npm publish --tag latest
|
||||||
|
|
||||||
.PHONY: python-publish
|
.PHONY: python-publish
|
||||||
python-publish: ## Publish the python packages
|
python-publish: ## Publish the python packages
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
"name": "kubernetes-mcp-server-darwin-amd64",
|
"name": "kubernetes-mcp-server-darwin-amd64",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/containers/kubernetes-mcp-server.git"
|
||||||
|
},
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
"name": "kubernetes-mcp-server-darwin-arm64",
|
"name": "kubernetes-mcp-server-darwin-arm64",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/containers/kubernetes-mcp-server.git"
|
||||||
|
},
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
"name": "kubernetes-mcp-server-linux-amd64",
|
"name": "kubernetes-mcp-server-linux-amd64",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/containers/kubernetes-mcp-server.git"
|
||||||
|
},
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
"name": "kubernetes-mcp-server-linux-arm64",
|
"name": "kubernetes-mcp-server-linux-arm64",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/containers/kubernetes-mcp-server.git"
|
||||||
|
},
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
"name": "kubernetes-mcp-server-windows-amd64",
|
"name": "kubernetes-mcp-server-windows-amd64",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/containers/kubernetes-mcp-server.git"
|
||||||
|
},
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
"name": "kubernetes-mcp-server-windows-arm64",
|
"name": "kubernetes-mcp-server-windows-arm64",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
"description": "Model Context Protocol (MCP) server for Kubernetes and OpenShift",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/containers/kubernetes-mcp-server.git"
|
||||||
|
},
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user