Skip to content

Commit 083755c

Browse files
Add workflows
1 parent 7645e05 commit 083755c

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

.github/workflows/build.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish package
2+
on:
3+
push:
4+
branches: [main]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: "20.x"
16+
- run: pnpm install
17+
- run: pnpm build

.github/workflows/publish.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish package
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: "20.x"
16+
registry-url: "https://npm.pkg.github.com"
17+
scope: "@OpenRouterTeam"
18+
- run: pnpm install
19+
- run: pnpm build
20+
- run: pnpm publish
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"scripts": {
1010
"build": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack-config.json\" webpack --config webpack.config.ts"
1111
},
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/OpenRouterTeam/markdown-wasm.git"
15+
},
1216
"devDependencies": {
1317
"@types/node": "^22.13.4",
1418
"@types/webpack": "^5.28.5",

0 commit comments

Comments
 (0)