Skip to content

Commit c2e5a2a

Browse files
committed
chore(ci): 🔧 👷 migrate from changesets to release-please
- Remove @changesets/cli and publish-packages script from root package.json - Delete changeset config and outstanding changeset files - Bump @gracefullight/docusaurus-plugin-copy-markdown to v0.1.3 in package.json and CHANGELOG.md - Add Google's release-please workflows and configuration
1 parent 326e6cf commit c2e5a2a

10 files changed

Lines changed: 149 additions & 259 deletions

File tree

.changeset/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/blog-copy-button-below-header.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/config.json

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch: {}
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
# 1. On every push to main, open/update a per-package release PR with the
15+
# generated CHANGELOG + version bump. When a release PR is merged, this
16+
# step instead tags the release and emits `paths_released`.
17+
release-please:
18+
runs-on: ubuntu-latest
19+
outputs:
20+
paths_released: ${{ steps.release.outputs.paths_released }}
21+
steps:
22+
- uses: googleapis/release-please-action@v4
23+
id: release
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
config-file: release-please-config.json
27+
manifest-file: .release-please-manifest.json
28+
29+
# 2. Publish only the packages that were just released. The matrix is the
30+
# JSON array of released package paths, so it is empty (job skipped) on
31+
# plain commits and only fans out when a release PR merge tags packages.
32+
publish:
33+
needs: release-please
34+
if: needs.release-please.outputs.paths_released != '[]' && needs.release-please.outputs.paths_released != ''
35+
runs-on: ubuntu-latest
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
path: ${{ fromJson(needs.release-please.outputs.paths_released) }}
40+
steps:
41+
- uses: actions/checkout@v5
42+
- uses: oven-sh/setup-bun@v2
43+
- name: INSTALL_PACKAGES
44+
run: bun install --frozen-lockfile
45+
- name: BUILD_PACKAGE
46+
run: bunx turbo run build --filter=./${{ matrix.path }}
47+
- name: PUBLISH_TO_NPM
48+
working-directory: ${{ matrix.path }}
49+
env:
50+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
run: |
52+
printf '//registry.npmjs.org/:_authToken=%s\n' "$NPM_TOKEN" > "$HOME/.npmrc"
53+
bun publish --access public --tolerate-republish

.release-please-manifest.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"packages/docusaurus-plugin-baidu-analytics": "1.0.0",
3+
"packages/docusaurus-plugin-channelio": "1.0.0",
4+
"packages/docusaurus-plugin-chatra": "1.0.0",
5+
"packages/docusaurus-plugin-cloudflare-analytics": "1.0.0",
6+
"packages/docusaurus-plugin-copy-markdown": "0.1.3",
7+
"packages/docusaurus-plugin-gitter": "1.0.0",
8+
"packages/docusaurus-plugin-google-adsense": "1.0.0",
9+
"packages/docusaurus-plugin-intercom": "1.0.0",
10+
"packages/docusaurus-plugin-meta-pixel": "1.0.0",
11+
"packages/docusaurus-plugin-microsoft-clarity": "1.0.0",
12+
"packages/docusaurus-plugin-naver-analytics": "1.0.0",
13+
"packages/docusaurus-plugin-sentry": "1.0.0",
14+
"packages/docusaurus-plugin-tailwind": "1.1.0",
15+
"packages/docusaurus-plugin-vercel-analytics": "1.0.1",
16+
"packages/docusaurus-plugin-yandex-metrica": "1.0.1"
17+
}

bun.lock

Lines changed: 35 additions & 232 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
},
66
"devDependencies": {
77
"@biomejs/biome": "^2.2.6",
8-
"@changesets/cli": "^2.29.7",
98
"@commitlint/cli": "^20.1.0",
109
"@commitlint/config-conventional": "^20.0.0",
1110
"@commitlint/types": "^20.0.0",
@@ -33,7 +32,6 @@
3332
"gen": "turbo gen",
3433
"lint": "biome check --fix --unsafe --no-errors-on-unmatched",
3534
"prepare": "husky",
36-
"publish-packages": "turbo run build && changeset version && changeset publish",
3735
"test": "turbo run test"
3836
},
3937
"version": "0.3.0",

packages/docusaurus-plugin-copy-markdown/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @gracefullight/docusaurus-plugin-copy-markdown
22

3+
## 0.1.3
4+
5+
### Patch Changes
6+
7+
- cf48248: Place the blog copy button below the post header (after the author/date metadata) instead of wedging it between the title and the profile. Docs pages keep the button directly under the title. The insertion logic is now split into a dependency-free `dom` module with DOM regression tests covering blog post, blog list, and docs pages.
8+
39
## 0.1.2
410

511
### Patch Changes

packages/docusaurus-plugin-copy-markdown/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737
"test": "vitest run"
3838
},
3939
"types": "./dist/index.d.ts",
40-
"version": "0.1.2"
40+
"version": "0.1.3"
4141
}

release-please-config.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"bootstrap-sha": "cf482486ae761b6ee08907fd34470b3336c3a1a4",
4+
"bump-minor-pre-major": true,
5+
"changelog-sections": [
6+
{ "section": "Features", "type": "feat" },
7+
{ "section": "Bug Fixes", "type": "fix" },
8+
{ "section": "Performance Improvements", "type": "perf" },
9+
{ "section": "Code Refactoring", "type": "refactor" },
10+
{ "section": "Reverts", "type": "revert" },
11+
{ "section": "Documentation", "type": "docs" },
12+
{ "section": "Dependencies", "type": "deps" },
13+
{ "hidden": true, "section": "Styles", "type": "style" },
14+
{ "hidden": true, "section": "Miscellaneous", "type": "chore" },
15+
{ "hidden": true, "section": "Tests", "type": "test" }
16+
],
17+
"include-component-in-tag": true,
18+
"packages": {
19+
"packages/docusaurus-plugin-baidu-analytics": {},
20+
"packages/docusaurus-plugin-channelio": {},
21+
"packages/docusaurus-plugin-chatra": {},
22+
"packages/docusaurus-plugin-cloudflare-analytics": {},
23+
"packages/docusaurus-plugin-copy-markdown": {},
24+
"packages/docusaurus-plugin-gitter": {},
25+
"packages/docusaurus-plugin-google-adsense": {},
26+
"packages/docusaurus-plugin-intercom": {},
27+
"packages/docusaurus-plugin-meta-pixel": {},
28+
"packages/docusaurus-plugin-microsoft-clarity": {},
29+
"packages/docusaurus-plugin-naver-analytics": {},
30+
"packages/docusaurus-plugin-sentry": {},
31+
"packages/docusaurus-plugin-tailwind": {},
32+
"packages/docusaurus-plugin-vercel-analytics": {},
33+
"packages/docusaurus-plugin-yandex-metrica": {}
34+
},
35+
"release-type": "node",
36+
"separate-pull-requests": true
37+
}

0 commit comments

Comments
 (0)