Skip to content

Commit 7478283

Browse files
authored
Merge pull request #40 from Shopify/bf/add-deploy-workflow
Add `release` workflow
2 parents 86ea08c + 3c541ca commit 7478283

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
- uses: actions/setup-node@v3
20+
name: Setup node.js
21+
with:
22+
cache: npm
23+
node-version-file: ".nvmrc"
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
shell: bash
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Create Release Pull Request or Publish to npm
33+
id: changesets
34+
uses: changesets/action@v1
35+
with:
36+
publish: npm run release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"lint:fix": "prettier --write --ignore-unknown .",
1212
"lint": "prettier --check --cache --ignore-unknown .",
1313
"inspector": "npm run build && npx @modelcontextprotocol/inspector dist/index.js",
14+
"release": "changeset publish",
1415
"typecheck": "tsc --noEmit"
1516
},
1617
"author": "",

0 commit comments

Comments
 (0)