-
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
Changes from 4 commits
5aaa765
46a4193
91f56b4
0631d06
d48adb0
f4f0bac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- "8.0" # remove this after 8.0 is merged into main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Lint | ||
run: pnpm run lint | ||
|
||
- name: Typecheck | ||
run: pnpm run typecheck && pnpm run dev:typecheck | ||
|
||
- name: Build | ||
run: pnpm run build | ||
|
||
- name: Publint | ||
run: pnpm run publint |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v**" | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
environment: npm-publish | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
kingyue737 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: pnpm | ||
|
||
- name: Install Dependencies | ||
run: pnpm install | ||
|
||
- name: Extract release notes | ||
run: pnpm releaselog --format=notes ${{ github.ref_name }} > RELEASE_NOTES.md | ||
|
||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body_path: RELEASE_NOTES.md | ||
prerelease: ${{ contains(github.ref_name, '-') }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build | ||
run: pnpm run build | ||
kingyue737 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Publish to npm | ||
run: npm i -g npm && pnpm publish --access public --tag latest --no-git-checks | ||
kingyue737 marked this conversation as resolved.
Show resolved
Hide resolved
kingyue737 marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
"author": "GU Yiling <[email protected]>", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "pnpm run docs && tsdown", | ||
"build": "tsdown", | ||
"typecheck": "tsc", | ||
"lint": "eslint . --fix", | ||
"format": "prettier . --write", | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. bump version and trigger release ci via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can still use |
||
}, | ||
"packageManager": "[email protected]", | ||
"type": "module", | ||
|
@@ -48,6 +48,7 @@ | |
"@vue/eslint-config-typescript": "^14.6.0", | ||
"@vue/tsconfig": "^0.7.0", | ||
"@vueuse/core": "^13.6.0", | ||
"bumpp": "^10.2.2", | ||
"comment-mark": "^2.0.1", | ||
"echarts": "^6.0.0", | ||
"echarts-gl": "^2.0.9", | ||
|
@@ -61,6 +62,7 @@ | |
"postcss-nested": "^7.0.2", | ||
"prettier": "^3.6.2", | ||
"publint": "^0.3.12", | ||
"releaselog": "^6.0.3", | ||
"tsdown": "^0.13.3", | ||
"typescript": "^5.9.2", | ||
"unplugin-raw": "^0.5.1", | ||
|
Uh oh!
There was an error while loading. Please reload this page.