Skip to content

Commit

Permalink
Setup changesets based release (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzuraw authored Feb 26, 2024
1 parent 5fa07e7 commit df2038a
Show file tree
Hide file tree
Showing 9 changed files with 8,304 additions and 5,547 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -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 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/changelog-git",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = {
},
],
},
ignorePatterns: [".eslintrc.cjs", "commitlint.config.cjs", "vite.config.ts"],
ignorePatterns: [".eslintrc.cjs", "vite.config.ts"],
overrides: [
{
files: ["*.stories.tsx"],
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Open release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Prepare release with Changesets
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
run_install: |
- args: [--frozen-lockfile]
- name: Create Release Pull Request
uses: changesets/action@e2f8e964d080ae97c874b19e27b12e0a8620fb6c # v1.4.6
id: changesets
with:
title: Release to npm
commit: Release to npm
publish: "pnpm publish:ci"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
22 changes: 0 additions & 22 deletions .github/workflows/pull_request.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .release-it.cjs

This file was deleted.

1 change: 0 additions & 1 deletion commitlint.config.cjs

This file was deleted.

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
"test": "vitest",
"dev": "storybook dev -p 6006",
"dev:docs": "storybook dev -p 6006 --docs",
"make-release": "release-it",
"release": "npm-run-all build make-release",
"release": "pnpm publish && pnpm exec changeset tag && git push --follow-tags",
"prepare": "is-ci || husky install",
"chromatic": "chromatic --exit-zero-on-changes"
},
Expand All @@ -60,9 +59,8 @@
"access": "public"
},
"devDependencies": {
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^17.6.7",
"@release-it/conventional-changelog": "^7.0.0",
"@changesets/changelog-git": "^0.2.0",
"@changesets/cli": "^2.27.1",
"@storybook/addon-actions": "^7.6.3",
"@storybook/addon-essentials": "^7.6.3",
"@storybook/addon-interactions": "^7.6.3",
Expand Down Expand Up @@ -97,7 +95,6 @@
"prettier": "^3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"release-it": "^16.1.3",
"rollup-plugin-visualizer": "5.12.0",
"storybook": "^7.2.1",
"typescript": "^5.1.6",
Expand Down
Loading

0 comments on commit df2038a

Please sign in to comment.