Skip to content

Commit c280ba3

Browse files
Add workflows
1 parent 7645e05 commit c280ba3

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

.github/workflows/build.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build 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+
- uses: pnpm/action-setup@v4
17+
- run: pnpm install
18+
- run: pnpm build

.github/workflows/publish.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish package
2+
on:
3+
release:
4+
types: [published]
5+
workflow_dispatch: {}
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: "20.x"
18+
registry-url: "https://registry.npmjs.org"
19+
scope: "@openrouter"
20+
- uses: pnpm/action-setup@v4
21+
- run: pnpm install --frozen-lockfile
22+
- run: pnpm build
23+
- run: pnpm publish --provenance --access public --no-git-checks
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

+4
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",

rust-toolchain.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
# https://github.com/rustwasm/wasm-bindgen/issues/4211
44
channel = "1.81.0"
55
targets = ["wasm32-unknown-unknown"]
6+
components = ["rust-src"]

0 commit comments

Comments
 (0)