Skip to content

Commit 8d100d3

Browse files
author
Philip Z
committed
ci: publish AI SDK through npm OIDC
1 parent fc17542 commit 8d100d3

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish TeaQL AI SDK
2+
3+
on:
4+
push:
5+
tags:
6+
- "ai-sdk-v*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
environment: npm
12+
permissions:
13+
contents: read
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v7
17+
- uses: actions/setup-node@v7
18+
with:
19+
node-version: "22"
20+
registry-url: https://registry.npmjs.org
21+
cache: npm
22+
- run: npm ci
23+
- name: Verify tag matches package version
24+
run: test "${GITHUB_REF_NAME#ai-sdk-v}" = "$(node -p 'require("./package.json").version')"
25+
- run: npm run check
26+
- run: npm test
27+
- run: npm run build
28+
- run: npm run example
29+
- name: Upgrade npm for trusted publishing
30+
run: npm install --global npm@latest
31+
- run: npm publish --access public

0 commit comments

Comments
 (0)