-
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5aaa765
chore: release and publish from github actions
Justineo 46a4193
fix: install pnpm before node
Justineo 91f56b4
improve ci
kingyue737 0631d06
add back build in test
kingyue737 d48adb0
fix: add back dist-tag
kingyue737 f4f0bac
update ci step names
kingyue737 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
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: Get dist tag | ||
id: tag | ||
run: echo "tag=$(pnpm exec jiti scripts/dist-tag.ts '${{ github.ref_name }}')" >> $GITHUB_OUTPUT | ||
|
||
- name: Publish to npm | ||
run: npm i -g npm && pnpm publish --access public --tag ${{ steps.tag.outputs.tag }} --no-git-checks | ||
kingyue737 marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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 --all" | ||
}, | ||
"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", | ||
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.