-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore: release and publish from github actions #850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces automated CI/CD workflows to streamline development and release processes. It adds GitHub Actions for continuous integration testing and automated npm publishing with GitHub releases.
- Adds CI workflow for automated testing on PRs and pushes to main branch
- Adds release workflow for manual npm publishing and GitHub release creation
- Includes utility scripts for changelog extraction and npm dist-tag resolution
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
.github/workflows/ci.yml |
CI workflow for running lint, typecheck, build, and publint on PRs and pushes |
.github/workflows/release.yml |
Release workflow for npm publishing and GitHub release creation |
scripts/dist-tag.ts |
Utility to resolve npm dist-tag from semver version strings |
scripts/changelog.ts |
Utility to extract changelog sections for specific versions |
pnpm-workspace.yaml |
Workspace configuration specifying esbuild as build-only dependency |
.github/workflows/release.yml
Outdated
name: Release | ||
|
||
on: | ||
workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be a common practice to trigger releases via Git tags. Since we can extract the version directly from the tag, this simplifies the process and makes the .dist-tag.ts
script unnecessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we try the new trusted publishing? Guide ->; Example ->
Two major benefits:
- no npm token
- We can get the following card in our npm page!!

package.json
Outdated
@@ -19,7 +19,7 @@ | |||
"dev:preview": "vite preview", | |||
"dev:typecheck": "vue-tsc -p ./demo", | |||
"docs": "jiti ./scripts/docs.ts", | |||
"prepublishOnly": "pnpm run typecheck && pnpm run dev:typecheck && pnpm run build && publint" | |||
"release": "pnpm run docs && bumpp -a" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump version and trigger release ci via pnpm run release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bumpp
makes it rather easy to bump the version and create a new tag. I’ve used it in other projects, but often ended up creating tags with the wrong content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can still use bumpp
for version bumping and tagging, but I’d prefer to trigger the release manually.
I manually trigger the release workflow (including both npm publish and GitHub release) because I prefer not to use automated changelogs, which are often hard to read. Instead, I maintain a manual |
I already configured that. |
We don't use automated changelogs, they are still extracted from The release is still manually triggered, via running |
Oh, I missed that. But looking at the repo, I’m starting to wonder if introducing a package that hasn’t been maintained for six years is a good idea…
I mean, I want to keep the Git operations separate from the release process. But on second thought, it might be fine to trigger the release from a Git tag, since it ensures we have consistent Git tags, GitHub releases and npm versions, and I’ve already added the environment: npm-publish config to require human approval. |
published 7 months ago and still maintained. |
Nevermind, it seems that we are not looking at the same repo 😅 |
This PR:
main
branch