@@ -105,50 +105,38 @@ jobs:
105105 run : |
106106 PACKAGE_NAME=$(jq -r '.name' < package.json)
107107 VERSION="${{ needs.check.outputs.VERSION }}"
108+ # Strip the 'v' prefix for npm
109+ NPM_VERSION="${VERSION#v}"
108110 MAX_ATTEMPTS=30
109111 SLEEP_SECONDS=10
110112
111- echo "Waiting for ${PACKAGE_NAME}@${VERSION } to be available on npm..."
113+ echo "Waiting for ${PACKAGE_NAME}@${NPM_VERSION } to be available on npm..."
112114
113115 for i in $(seq 1 $MAX_ATTEMPTS); do
114- if npm view "${PACKAGE_NAME}@${VERSION }" version >/dev/null 2>&1; then
115- echo "✓ Package ${PACKAGE_NAME}@${VERSION } is now available on npm"
116+ if npm view "${PACKAGE_NAME}@${NPM_VERSION }" version >/dev/null 2>&1; then
117+ echo "✓ Package ${PACKAGE_NAME}@${NPM_VERSION } is now available on npm"
116118 exit 0
117119 fi
118120 echo "Attempt $i/$MAX_ATTEMPTS: Package not yet available, waiting ${SLEEP_SECONDS}s..."
119121 sleep $SLEEP_SECONDS
120122 done
121123
122- echo "::error::Package ${PACKAGE_NAME}@${VERSION } did not become available after $((MAX_ATTEMPTS * SLEEP_SECONDS)) seconds"
124+ echo "::error::Package ${PACKAGE_NAME}@${NPM_VERSION } did not become available after $((MAX_ATTEMPTS * SLEEP_SECONDS)) seconds"
123125 exit 1
124126
125127 docker-push :
126128 needs : [check, publish]
127129 uses : ./.github/workflows/docker-publish.yml
128- permissions : {}
130+ permissions :
131+ contents : read
129132 secrets :
130133 DOCKERHUB_USERNAME : ${{ secrets.DOCKERHUB_USERNAME }}
131134 DOCKERHUB_PASSWORD : ${{ secrets.DOCKERHUB_PASSWORD }}
132135
133136 mcp-publish :
134- runs-on : ubuntu-latest
135- environment : Production
136- permissions :
137- id-token : write
138137 needs : [check, docker-push]
139138 if : needs.check.outputs.VERSION_EXISTS == 'false'
140- steps :
141- - uses : GitHubSecurityLab/actions-permissions/monitor@v1
142- - uses : actions/checkout@v5
143- with :
144- persist-credentials : false
145-
146- - name : Install MCP Publisher
147- run : |
148- 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
149-
150- - name : Login to MCP Registry
151- run : ./mcp-publisher login github-oidc
152-
153- - name : Publish to MCP Registry
154- run : ./mcp-publisher publish
139+ uses : ./.github/workflows/mcp-publish.yml
140+ permissions :
141+ id-token : write
142+ contents : read
0 commit comments