Skip to content

Commit

Permalink
Setup changesets (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Feb 9, 2025
1 parent 9f22fc3 commit f436991
Show file tree
Hide file tree
Showing 7 changed files with 501 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 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)
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{ "repo": "bluwy/whyframe" }
],
"commit": false,
"access": "public",
"fixed": [],
"linked": [],
"baseBranch": "master",
"updateInternalDependencies": "minor",
"ignore": []
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: pnpm
cache-dependency-path: '**/pnpm-lock.yaml'

Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
workflow_dispatch:
push:
branches:
- master
paths:
- '.changeset/**'
- '.github/workflows/release.yml'
- 'pnpm-lock.yaml'

jobs:
release:
# prevents this action from running on forks
if: github.repository == 'bluwy/whyframe'
name: Release
permissions:
pull-requests: write # to create pull request (changesets/action)
contents: write # to create release (changesets/action)
id-token: write # OpenID Connect token needed for provenance
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history for changelog generation

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Create release PR or publish to npm
uses: changesets/action@v1
with:
commit: Release packages
title: Release packages
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"astro": "^2.10.15",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
"shiki": "^0.14.7",
"shiki": "0.14.3",
"svelte": "^4.2.19",
"vite-plugin-cloudflare-redirect": "^0.1.2",
"vite-plugin-inspect": "^0.8.9"
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"format": "prettier \"**/*.{js,ts,jsx,css,md,vue,svelte,astro}\" --write --cache"
},
"devDependencies": {
"@changesets/cli": "^2.27.12",
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.13.0",
"prettier-plugin-svelte": "^3.3.3",
Expand All @@ -26,7 +28,8 @@
"@whyframe/core": "workspace:*",
"@whyframe/jsx": "workspace:*",
"@whyframe/svelte": "workspace:*",
"@whyframe/vue": "workspace:*"
"@whyframe/vue": "workspace:*",
"prettier": "$prettier"
},
"peerDependencyRules": {
"ignoreMissing": [
Expand Down
Loading

0 comments on commit f436991

Please sign in to comment.