Skip to content

Commit cce7d39

Browse files
Merge pull request #310 from SavioBS629/harden-workflows
fix(ci): harden workflows
2 parents d992a39 + c66b005 commit cce7d39

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/mcp-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request_review:
55
types: [submitted]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
test:
912
if: github.event.pull_request.base.ref == 'main' && github.event.review.state == 'approved'

.github/workflows/mcp-registry-publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232

3333
- name: Install MCP Publisher
3434
run: |
35-
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.3.3/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
36-
35+
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.3.3/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
3736
- name: Login to MCP Registry
3837
run: ./mcp-publisher login github-oidc
3938

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
permissions:
77
contents: write
8+
id-token: write
89

910
jobs:
1011
publish:
@@ -99,7 +100,7 @@ jobs:
99100
run: git push origin ${{ steps.get_version.outputs.version }}
100101

101102
- name: "Publish to NPM"
102-
run: npm publish --access public
103+
run: npm publish --access public --provenance
103104
env:
104105
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
105106

0 commit comments

Comments
 (0)