Setup Changeset to publish packages to NPM (#2384)

This commit is contained in:
Samy Pessé
2024-07-18 21:00:50 +02:00
committed by GitHub
parent 29a0bf25c4
commit 5f8a8fe9b1
10 changed files with 68 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
+11
View File
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
+8
View File
@@ -0,0 +1,8 @@
---
'@gitbook/emoji-codepoints': minor
'@gitbook/react-contentkit': minor
'@gitbook/react-openapi': minor
'@gitbook/react-math': minor
---
Initial release
+35
View File
@@ -0,0 +1,35 @@
name: Publish
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.18
- name: Install dependencies
run: bun install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: 1
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
BIN
View File
Binary file not shown.
+2
View File
@@ -13,6 +13,7 @@
"typecheck": "tsc --noEmit",
"unit": "bun test {src,packages}",
"e2e": "playwright test",
"changeset": "changeset",
"postinstall": "rm -rf ./public/~gitbook/static/mathjax@3.2.2 && mkdir -p ./public/~gitbook/static/ && cp -R node_modules/mathjax/es5 ./public/~gitbook/static/mathjax@3.2.2"
},
"workspaces": [
@@ -65,6 +66,7 @@
},
"devDependencies": {
"@argos-ci/playwright": "^2.0.0",
"@changesets/cli": "^2.27.7",
"@cloudflare/next-on-pages": "^1.11.3",
"@cloudflare/workers-types": "^4.20231218.0",
"@playwright/test": "^1.42.1",
+1
View File
@@ -1,6 +1,7 @@
{
"name": "@gitbook/emoji-codepoints",
"description": "Optimized mapping of codepoints to the fully qualified emoji codepoints",
"version": "0.0.0",
"private": true,
"exports": "./index.ts",
"dependencies": {},
+1
View File
@@ -1,5 +1,6 @@
{
"name": "@gitbook/react-contentkit",
"version": "0.0.0",
"exports": "./src/index.ts",
"dependencies": {
"classnames": "^2.5.1",
+1
View File
@@ -1,6 +1,7 @@
{
"name": "@gitbook/react-math",
"exports": "./src/index.ts",
"version": "0.0.0",
"dependencies": {
"object-hash": "^3.0.0"
},
+1
View File
@@ -1,6 +1,7 @@
{
"name": "@gitbook/react-openapi",
"exports": "./src/index.ts",
"version": "0.0.0",
"dependencies": {
"@scalar/api-client-react": "^0.3.7",
"@scalar/oas-utils": "0.1.6",