From 90ee4e122dbbda7bef39eedaec6909cf04d74eca Mon Sep 17 00:00:00 2001 From: Anthony Powell Date: Mon, 9 Dec 2024 14:45:56 -0500 Subject: [PATCH] Add changesets CI (#35) --- .changeset/README.md | 8 ++++++ .changeset/config.json | 11 ++++++++ .changeset/cool-years-eat.md | 5 ++++ .github/workflows/changesets.yml | 44 ++++++++++++++++++++++++++++++++ package.json | 4 ++- 5 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json create mode 100644 .changeset/cool-years-eat.md create mode 100644 .github/workflows/changesets.yml diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000..e5b6d8d6 --- /dev/null +++ b/.changeset/README.md @@ -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) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..c8fca743 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.4/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.changeset/cool-years-eat.md b/.changeset/cool-years-eat.md new file mode 100644 index 00000000..b78828cb --- /dev/null +++ b/.changeset/cool-years-eat.md @@ -0,0 +1,5 @@ +--- +"@arizeai/point-cloud": major +--- + +Refactor build tooling, package as ESM by default diff --git a/.github/workflows/changesets.yml b/.github/workflows/changesets.yml new file mode 100644 index 00000000..a498d41f --- /dev/null +++ b/.github/workflows/changesets.yml @@ -0,0 +1,44 @@ +name: Changesets +on: + push: + branches: + - main +env: + CI: true + PNPM_CACHE_FOLDER: .pnpm-store +jobs: + version: + timeout-minutes: 15 + runs-on: ubuntu-latest + steps: + - name: checkout code repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: setup node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + scope: "@arizeai" + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: install pnpm + run: npm i pnpm@latest -g + - name: Setup npmrc + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc + - name: setup pnpm config + run: pnpm config set store-dir $PNPM_CACHE_FOLDER + - name: install dependencies + run: pnpm install + - name: create and publish versions + uses: changesets/action@v1 + with: + version: pnpm ci:version + commit: "chore: update versions" + title: "chore: update versions" + publish: pnpm ci:publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index e390aeee..b6557ce6 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,8 @@ "analyze": "size-limit --why", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", - "chromatic": "npx chromatic --project-token=46df7a59e0a8" + "chromatic": "npx chromatic --project-token=46df7a59e0a8", + "ci:publish": "pnpm publish -r" }, "peerDependencies": { "@react-three/drei": "^9.105.5", @@ -67,6 +68,7 @@ } ], "devDependencies": { + "@changesets/cli": "^2.27.10", "@react-three/drei": "^9.105.5", "@react-three/fiber": "8.13.3", "@size-limit/esbuild": "^11.1.6",