Skip to content

Commit 389164d

Browse files
committed
feature: mcp server release
1 parent f20ec5d commit 389164d

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: publish-release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
npmjs:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Publish package
26+
run: npm publish --provenance --access public
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
30+
github:
31+
runs-on: ubuntu-latest
32+
permissions:
33+
contents: read
34+
id-token: write
35+
packages: write
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- uses: actions/setup-node@v4
40+
with:
41+
node-version: '20.x'
42+
registry-url: 'https://npm.pkg.github.com'
43+
scope: '@hostinger'
44+
45+
- name: Install dependencies
46+
run: npm install
47+
48+
- name: Publish package
49+
run: |
50+
sed -i 's+"name": ".*+"name": "@${{ github.repository }}",+gI' ./package.json
51+
npm publish --provenance --access public
52+
env:
53+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)