Skip to content

Commit

Permalink
Add prepare changelog workflow to automatically propose what should b…
Browse files Browse the repository at this point in the history
…e kept in sync for us
  • Loading branch information
NullVoxPopuli committed Apr 19, 2023
1 parent a6cd4aa commit 1d22147
Show file tree
Hide file tree
Showing 4 changed files with 1,560 additions and 52 deletions.
2 changes: 2 additions & 0 deletions .changeset/.recoverignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
16f6c0d291a2fc5af36b4f4d73ecb047417cf318

47 changes: 47 additions & 0 deletions .github/workflows/prepare-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Prepare Changelog'
on:
push:
branches:
- main
env:
branch: "sync-changelog"
title: "[Release Prep]: Update proposed changelog"
commit: "pre-release :: add changesets"
body: |
Automated and continuously updated PR for adding changeset entries for merged PRs.
TODO
- [ ] Determine patch/minor/major impact for each package for each changeset
- [ ] if applicable, mark/remove certain changes as omitted from the changelog
- [ ] if applicable, bundle changes together in to a single "change set"
Remember
- This PR is updated on every merge to `main`
- This PR is force-pushed, so changes should happen on a separate branch
jobs:
determine-changes:
name: Determine Changes
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/setup
# specify the owner so that forks with their origin poiting at the fork still query the upstream PR list
- run: yarn prepare:changelog --non-interactive
env:
# avoiding API read throttling
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: ${{ env.commit }}
draft: true
branch: ${{ env.branch }}
base: 'main'
title: ${{ env.title }}
body: ${{ env.body }}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
]
},
"scripts": {
"postinstall": "patch-package",
"release": "changeset publish",
"clean": "git clean -x -f",
"compile": "tsc",
"prepare:changelog": "changeset-recover --owner embroider-build --only-prs",
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
"lint:eslint": "eslint . --cache",
Expand Down Expand Up @@ -68,6 +70,8 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^3.1.4",
"changeset-recover": "0.1.0-beta.8",
"patch-package": "^6.5.1",
"jest": "^29.2.1",
"prettier": "^2.3.1",
"typescript": "4.4.2"
Expand Down
Loading

0 comments on commit 1d22147

Please sign in to comment.