Skip to content

Commit

Permalink
Add check for changeset in CI (#191)
Browse files Browse the repository at this point in the history
* Add check for changeset in CI

* Fix changeset status check

* Fix checkout depth

* Fix format

* Add changeset

* Run changeset directly from CI with pnpm exec

* Use @changesets/changelog-github for formatting changelog
  • Loading branch information
robmosca authored Sep 28, 2023
1 parent ca6faf9 commit 48389d9
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"changelog": [
"@changesets/changelog-github",
{ "repo": "single-spa/single-spa-react" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"baseBranch": "origin/main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/heavy-starfishes-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"single-spa-react": patch
---

Add check for changeset being present in PRs
4 changes: 4 additions & 0 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
# check out full history
fetch-depth: 0

- name: Install Pnpm
uses: pnpm/action-setup@v2
Expand All @@ -36,6 +39,7 @@ jobs:
run: |
pnpm run lint
pnpm run check-format
pnpm exec changeset status --since=origin/main
- name: Build
run: pnpm run build
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"@babel/preset-env": "^7.15.6",
"@babel/preset-react": "^7.14.5",
"@babel/runtime": "^7.15.4",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@jest/types": "^27.1.1",
"@rollup/plugin-babel": "^5.3.0",
Expand Down
26 changes: 26 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48389d9

Please sign in to comment.