Skip to content

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

Merged
merged 6 commits into from
Aug 9, 2025
Merged

Conversation

Justineo
Copy link
Member

@Justineo Justineo commented Aug 7, 2025

This PR:

  • Added two new workflows:
    • CI: run after PRs and pushes to ensure correctness
    • Release: manually trigger a npm publish and GitHub release from main branch

Copy link

vercel bot commented Aug 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vue-echarts ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 9, 2025 8:16am

Copy link

@Copilot Copilot AI left a 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

@kingyue737 kingyue737 mentioned this pull request Aug 8, 2025
13 tasks
name: Release

on:
workflow_dispatch:
Copy link
Member

@kingyue737 kingyue737 Aug 8, 2025

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.

Copy link
Member

@kingyue737 kingyue737 left a 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!!
Image

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"
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member Author

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.

@Justineo
Copy link
Member Author

Justineo commented Aug 8, 2025

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 CHANGELOG.md and create GitHub releases based on it.

@Justineo
Copy link
Member Author

Justineo commented Aug 8, 2025

Shall we try the new trusted publishing? Guide ->; Example ->

I already configured that.

@kingyue737
Copy link
Member

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 CHANGELOG.md and create GitHub releases based on it.

We don't use automated changelogs, they are still extracted from CHANGELOG.md (now via releaselog instead of a local script).

The release is still manually triggered, via running pnpm run release locally.

@Justineo
Copy link
Member Author

Justineo commented Aug 8, 2025

We don't use automated changelogs, they are still extracted from CHANGELOG.md (now via releaselog instead of a local script).

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…

The release is still manually triggered, via running pnpm run release locally.

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.

@kingyue737
Copy link
Member

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…

published 7 months ago and still maintained.
I think there might be a mix-up with the package. However, weekly downloads is a little low

@Justineo
Copy link
Member Author

Justineo commented Aug 8, 2025

published 7 months ago and still maintained.

Nevermind, it seems that we are not looking at the same repo 😅

@Justineo Justineo merged commit 177c0f8 into 8.0 Aug 9, 2025
5 checks passed
@Justineo Justineo deleted the chore/publish branch August 9, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants