#84 - github-release-for-libs#85
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds repository-level context for consistent terminology around communicating published library versions via GitHub Releases, intended to support a standardized release note/release record approach.
Changes:
- Introduces
CONTEXT.mddefining release-related terms (Release Run, Release Tag, PR Tag, etc.). - Establishes preferred/avoided language for stable vs pre-release GitHub Releases.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add github-release.ts with helpers for GitHub REST API interactions
- publishConsolidatedRelease creates one GitHub Release per publish run
listing all bumped packages (Package Version Set) with Changelog Links
- Stable releases: timestamped tag releases/YYYY-MM-DDTHH-MM-SS
- Pre-releases: per-PR tag releases/pr{N}, replaced on each run
- publishMaster and publishPreRelease now async; both create releases
when repository + GH_TOKEN are available
- Add github-release.spec.ts with tests for buildReleaseTag / buildReleaseBody
closes #84
Co-authored-by: mumenthalers <3604424+mumenthalers@users.noreply.github.com>
…lease name from tag Co-authored-by: mumenthalers <3604424+mumenthalers@users.noreply.github.com>
|
Implemented in commits What was added:
No workflow changes needed — the existing |
- @shiftcode/publish-helper@6.1.0-pr84.0
|
@copilot |
| exec('git tag -d $(git describe --abbrev=0)') | ||
| exec('git push') | ||
|
|
||
| if (ghToken) { | ||
| const newPackageTags = getNewPackageTags(tagsBefore) | ||
| log(`New package tags: ${newPackageTags.join(', ') || 'none'}`) | ||
| await publishConsolidatedRelease(repository, ghToken, newPackageTags, true, preId, event.pull_request.head.sha) |
| let body = '' | ||
| res.on('data', (chunk: string) => (body += chunk)) |
| try { | ||
| return await githubApiRequest<GithubRelease>('GET', `/repos/${repository}/releases/tags/${tagName}`, token) | ||
| } catch { | ||
| return null | ||
| } |
| { | ||
| "name": "@shiftcode/publish-helper", | ||
| "version": "6.0.0", | ||
| "version": "6.1.0-pr84.0", |
…, fix API error handling Co-authored-by: mumenthalers <3604424+mumenthalers@users.noreply.github.com>
…required Co-authored-by: mumenthalers <3604424+mumenthalers@users.noreply.github.com>
... Fixed in commit Root cause: Also fixed in this PR:
|
Implements automated GitHub Releases when publishing library versions, making it easier to track version history and changes.
Changes Made
packages/publish-helper/src/github-release.ts— New module with GitHub REST API helpers.publishConsolidatedReleasecreates one consolidated GitHub Release per publish run (not one per package), listing all bumped packages as a Package Version Set with Changelog Links.releases/YYYY-MM-DDTHH-MM-SSreleases/pr{N}, replaced on each new run to reflect the latest statepackages/publish-helper/src/publish-lib.ts—publishMasterandpublishPreReleaseare now async. Both capture new package tags around the lerna calls and create a consolidated GitHub Release whenGITHUB_REPOSITORY+GH_TOKENare available. SharedgetNewPackageTagshelper avoids duplication.packages/publish-helper/src/github-release.spec.ts— Tests forbuildReleaseTagandbuildReleaseBody.CONTEXT.md— Added release communication domain glossary defining language for GitHub Releases (Release Run, Release Tag, Package Version Set, Changelog Link, etc.).No workflow changes are needed — the existing
GH_TOKENenv var already present in the Publish step is sufficient.