feat: add monorepo support with configurable paths and prerelease types#121
Closed
feat: add monorepo support with configurable paths and prerelease types#121
Conversation
- Add new action inputs: working-directory, version-files, publish-packages, prerelease-type, base-branch - Support updating multiple package.json files when creating release PRs - Support configurable prerelease types (e.g., beta instead of canary) - Support monorepo subdirectories via working-directory input - Backwards compatible: existing repos continue to work with defaults
Only include commits that touch files in the working directory to prevent monorepo changelogs from including unrelated commits.
- Include version in PR title (e.g., "Release v0.0.6-beta.0") - Create PRs as drafts by default - Show commits in descending order (newest first) - Update stale PR detection to use branch pattern
Comment on lines
+22
to
+27
| export const versionFiles: string[] = JSON.parse( | ||
| getInput('version-files') || '["package.json"]', | ||
| ); | ||
| export const publishPackages: string[] | undefined = getInput('publish-packages') | ||
| ? JSON.parse(getInput('publish-packages')) | ||
| : undefined; |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Titles now follow format: "[Prefix] Beta Release v0.0.6-beta.10" - Prefix is optional and configurable via pr-title-prefix input - Version is always included - Prerelease type is capitalized (e.g., "Beta Release", "Canary Release")
Comment on lines
+101
to
+105
| // Use the first version file as the source of truth for the version | ||
| const versionFilePath = withWorkingDir(versionFiles[0]); | ||
| const { | ||
| content: { version }, | ||
| } = await getJsonFile<{ version: string }>('package.json'); | ||
| console.log('version:', version, 'is canary:', isCanary(version)); | ||
| } = await getJsonFile<{ version: string }>(versionFilePath as JSONFile); |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Much more efficient for monorepos - instead of fetching all commits and checking each one with a separate API call, use the GitHub API's built-in path filter to only retrieve commits touching the working directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for using turbo-module in monorepo setups where:
developer-platform/)betainstead ofcanary)New Inputs
working-directory.version-files["package.json"]publish-packagespackages/*prerelease-typecanarybase-branchmainmax-changelog-commits100Bug Fixes
Backwards Compatible
Existing repos using turbo-module will continue to work with no changes - all new inputs have sensible defaults.
Test Plan
developer-platform-test-sdk-release.ymlworkflow in whop-monorepodeveloper-platform/