Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/config@2.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [["@3jane/mui-themes", "@3jane/design-tokens"]],
"access": "public",
"updateInternalDependencies": "patch",
"ignore": [],
"baseBranch": "main"
}
65 changes: 65 additions & 0 deletions .github/workflows/merge-release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Publish release

on:
pull_request:
types: [closed]
workflow_dispatch:

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

jobs:
publish-release:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9.4.0
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Prepare environment
run: |
cat << EOF > "$HOME/.npmrc"
//npm.pkg.github.com/:_authToken=$NPM_TOKEN
EOF

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run release
run: |
pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95 changes: 95 additions & 0 deletions .github/workflows/prepare-release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Prepare release PR

on:
push:
branches-ignore:
- main

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

jobs:
prepare-release-pr:
if: ${{ !contains(github.event.head_commit.message, '[release]') }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9.4.0
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install Dependencies
run: pnpm install

- name: Setup git config
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare changesets
run: |
pnpm changeset-conventional
if [ -n "$(git status --porcelain .changeset)" ]; then
pnpm version-packages

CHANGED_PACKAGES=$(git diff --name-only | grep 'package.json' | xargs -I{} jq -r '.name + ": " + .version' {} | sort -u)

git add .
git commit -m "chore: 🚀 release packages [release]"

echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
echo "CHANGED_PACKAGES<<EOF" >> $GITHUB_ENV
echo "$CHANGED_PACKAGES" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
else
echo "CHANGES_DETECTED=false" >> $GITHUB_ENV
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Switch to main branch
if: env.CHANGES_DETECTED == 'true'
run: git checkout -b main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Pull Request
if: env.CHANGES_DETECTED == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name }}
title: "Release 🚀"
body: |
This PR was automatically created by the release workflow.

Updated packages:
${{ env.CHANGED_PACKAGES }}
labels: release
20 changes: 13 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
.idea/
node_modules/
experiments/
build/
.DS_Store
scratch.json
scratch.txt
scratch2.json
node_modules
.turbo
*.log
.next
dist
dist-ssr
*.local
.env
.cache
server/dist
public/dist
.turbo
.vscode
Loading