Skip to content

Commit 5f8a8fe

Browse files
authored
Setup Changeset to publish packages to NPM (#2384)
1 parent 29a0bf2 commit 5f8a8fe

File tree

10 files changed

+68
-0
lines changed

10 files changed

+68
-0
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/[email protected]/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+
}

.changeset/yellow-balloons-invent.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@gitbook/emoji-codepoints': minor
3+
'@gitbook/react-contentkit': minor
4+
'@gitbook/react-openapi': minor
5+
'@gitbook/react-math': minor
6+
---
7+
8+
Initial release

.github/workflows/publish.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
publish:
12+
name: Publish
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v3
17+
with:
18+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
19+
fetch-depth: 0
20+
- name: Setup bun
21+
uses: oven-sh/setup-bun@v1
22+
with:
23+
bun-version: 1.1.18
24+
- name: Install dependencies
25+
run: bun install --frozen-lockfile
26+
env:
27+
PUPPETEER_SKIP_DOWNLOAD: 1
28+
- name: Create Release Pull Request or Publish to npm
29+
id: changesets
30+
uses: changesets/action@v1
31+
with:
32+
publish: npm run release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

bun.lockb

26.1 KB
Binary file not shown.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"typecheck": "tsc --noEmit",
1414
"unit": "bun test {src,packages}",
1515
"e2e": "playwright test",
16+
"changeset": "changeset",
1617
"postinstall": "rm -rf ./public/~gitbook/static/[email protected] && mkdir -p ./public/~gitbook/static/ && cp -R node_modules/mathjax/es5 ./public/~gitbook/static/[email protected]"
1718
},
1819
"workspaces": [
@@ -65,6 +66,7 @@
6566
},
6667
"devDependencies": {
6768
"@argos-ci/playwright": "^2.0.0",
69+
"@changesets/cli": "^2.27.7",
6870
"@cloudflare/next-on-pages": "^1.11.3",
6971
"@cloudflare/workers-types": "^4.20231218.0",
7072
"@playwright/test": "^1.42.1",

packages/emoji-codepoints/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@gitbook/emoji-codepoints",
33
"description": "Optimized mapping of codepoints to the fully qualified emoji codepoints",
4+
"version": "0.0.0",
45
"private": true,
56
"exports": "./index.ts",
67
"dependencies": {},

packages/react-contentkit/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "@gitbook/react-contentkit",
3+
"version": "0.0.0",
34
"exports": "./src/index.ts",
45
"dependencies": {
56
"classnames": "^2.5.1",

packages/react-math/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@gitbook/react-math",
33
"exports": "./src/index.ts",
4+
"version": "0.0.0",
45
"dependencies": {
56
"object-hash": "^3.0.0"
67
},

packages/react-openapi/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@gitbook/react-openapi",
33
"exports": "./src/index.ts",
4+
"version": "0.0.0",
45
"dependencies": {
56
"@scalar/api-client-react": "^0.3.7",
67
"@scalar/oas-utils": "0.1.6",

0 commit comments

Comments
 (0)