Skip to content

Commit 2686ca6

Browse files
committed
Change publish configurations and add changeset
1 parent 80525da commit 2686ca6

File tree

9 files changed

+704
-77
lines changed

9 files changed

+704
-77
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/actions/common-setup.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Common Setup
2+
description: Setup pnpm and Node.js
3+
inputs:
4+
pnpm-version:
5+
description: The version of pnpm to use
6+
required: false
7+
default: '10.2.0'
8+
node-version:
9+
description: The version of Node.js to use
10+
required: false
11+
default: '18'
12+
cache:
13+
description: The cache to use
14+
required: false
15+
default: pnpm
16+
runs:
17+
using: composite
18+
steps:
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: ${{ inputs.pnpm-version }}
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ inputs.node-version }}
28+
cache: ${{ inputs.cache }}

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
publish:
7+
description: Publish new package version to npm registry
8+
required: true
9+
type: boolean
10+
default: false
11+
12+
permissions:
13+
contents: write
14+
packages: write
15+
pull-requests: write
16+
17+
jobs:
18+
publish:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Common Node and pnpm setup
25+
uses: ./.github/actions/common-setup
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Config npm registry
31+
run: pnpm config set registry https://registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
32+
33+
- name: Create Release Pull Request or Publish
34+
id: changesets
35+
uses: changesets/action@v1
36+
with:
37+
publish: pnpm ci:release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
40+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/quality-checks.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/quality.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Quality checks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
prettier:
13+
name: 'Prettier'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Common Node and pnpm setup
20+
uses: ./.github/actions/common-setup
21+
22+
- name: Run Prettier check
23+
run: pnpm run prettier-check
24+
25+
eslint:
26+
name: 'ESLint'
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Common Node and pnpm setup
33+
uses: ./.github/actions/common-setup
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile --prefer-offline
37+
38+
- name: Run ESLint check
39+
run: pnpm run lint

.github/workflows/tests.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,10 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

22-
- name: Setup pnpm
23-
uses: pnpm/action-setup@v4.0.0
24-
25-
- name: Use Node.js 18
26-
uses: actions/setup-node@v3
27-
with:
28-
node-version: '18'
29-
cache: 'pnpm'
30-
31-
- name: Install dependencies
32-
run: pnpm install --frozen-lockfile --prefer-offline
22+
- name: Common Node and pnpm setup
23+
uses: ./.github/actions/common-setup
3324

3425
- name: Run Node tests
3526
run: pnpm test:node
@@ -39,16 +30,10 @@ jobs:
3930
runs-on: ubuntu-latest
4031
steps:
4132
- name: Checkout
42-
uses: actions/checkout@v3
43-
44-
- name: Setup pnpm
45-
uses: pnpm/action-setup@v4.0.0
33+
uses: actions/checkout@v4
4634

47-
- name: Use Node.js 18
48-
uses: actions/setup-node@v3
49-
with:
50-
node-version: '18'
51-
cache: 'pnpm'
35+
- name: Common Node and pnpm setup
36+
uses: ./.github/actions/common-setup
5237

5338
- name: Install dependencies
5439
run: pnpm install --frozen-lockfile --prefer-offline

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sambanova-ai-provider",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Vercel AI Provider for running LLMs locally using SambaNova models",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
@@ -11,16 +11,20 @@
1111
"lint": "eslint \"./**/*.ts*\"",
1212
"prettier-check": "prettier --check \"./**/*.ts*\"",
1313
"prettier-write": "prettier . --write \"./**/*.ts*\"",
14+
"changeset": "changeset",
1415
"test": "pnpm test:node && pnpm test:edge",
1516
"test:node": "echo 'Running Node.js tests' && vitest --config vitest.node.config.js run",
16-
"test:edge": "echo 'Running Edge tests' && vitest --config vitest.edge.config.js run"
17+
"test:edge": "echo 'Running Edge tests' && vitest --config vitest.edge.config.js run",
18+
"ci:release": "pnpm clean && pnpm build && changeset publish",
19+
"ci:version": "changeset version && pnpm install --no-frozen-lockfile"
1720
},
1821
"dependencies": {
1922
"@ai-sdk/provider": "1.0.1",
2023
"@ai-sdk/provider-utils": "^2.0.0",
2124
"dotenv": "16.4.5"
2225
},
2326
"devDependencies": {
27+
"@changesets/cli": "^2.28.1",
2428
"@edge-runtime/vm": "^5.0.0",
2529
"@eslint/compat": "^1.2.7",
2630
"@eslint/eslintrc": "^3.3.0",

0 commit comments

Comments
 (0)