Skip to content

Commit dc3c8a0

Browse files
committed
ci: add release/test/lint actions, add build all packages script
1 parent a4260d4 commit dc3c8a0

File tree

12 files changed

+272
-697
lines changed

12 files changed

+272
-697
lines changed

.changeset/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/config.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
pull_request:
10+
branches:
11+
- main
12+
- master
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Install pnpm
22+
uses: pnpm/[email protected]
23+
24+
- name: Use Node.js
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: 16.x
28+
registry-url: https://registry.npmjs.org/
29+
cache: pnpm
30+
31+
- run: pnpm install
32+
33+
- name: Lint
34+
run: pnpm run lint

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Install pnpm
17+
uses: pnpm/[email protected]
18+
19+
- name: Use Node.js v16
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: v16
23+
registry-url: https://registry.npmjs.org/
24+
cache: pnpm
25+
26+
- run: npx conventional-github-releaser -p angular
27+
continue-on-error: true
28+
env:
29+
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}
30+
31+
- name: Install Dependencies
32+
run: pnpm install
33+
34+
- name: PNPM build
35+
run: pnpm run build
36+
37+
- name: Publish to NPM
38+
run: pnpm -r publish --access public --no-git-checks
39+
env:
40+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
41+
42+
# - name: Publish to VSCE & OVSX
43+
# run: npm run publish
44+
# working-directory: ./packages/vscode
45+
# env:
46+
# VSCE_TOKEN: ${{secrets.VSCE_TOKEN}}
47+
# OVSX_TOKEN: ${{secrets.OVSX_TOKEN}}

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
pull_request:
10+
branches:
11+
- main
12+
- master
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
18+
strategy:
19+
matrix:
20+
node-version: [14.x, 16.x]
21+
os: [ubuntu-latest]
22+
fail-fast: false
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Install pnpm
28+
uses: pnpm/[email protected]
29+
30+
- name: Use Node.js ${{ matrix.node-version }}
31+
uses: actions/setup-node@v2
32+
with:
33+
node-version: ${{ matrix.node-version }}
34+
registry-url: https://registry.npmjs.org/
35+
cache: pnpm
36+
37+
- run: pnpm install
38+
39+
- name: Build
40+
run: pnpm run build
41+
42+
- name: Test
43+
run: pnpm run test

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"basicprops",
8686
"browserslist",
8787
"Btns",
88+
"bumpp",
8889
"busi",
8990
"butn",
9091
"camelize",
@@ -143,6 +144,7 @@
143144
"operatirflag",
144145
"originjs",
145146
"outfile",
147+
"OVSX",
146148
"persistedstate",
147149
"pinzhi",
148150
"pnpm",

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 YangJinMing <https://github.com/2214962083>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
11
# Vue Superman
22

3-
尽可能用 `vscode` 参与本项目,这样可以获得最好开发体验。
4-
打开本项目会自动推荐你安装扩展,请安装相应的扩展。
5-
由于目前懒得写文档,所以大家先从代码层面熟悉一下项目风格。
6-
7-
## 起步
8-
9-
1. 升级 `node` 版本到 v14+
10-
2. 安装 `pnpm`
11-
12-
```bash
13-
npm i -g pnpm
14-
15-
```
16-
17-
3. 初始化项目
18-
19-
```bash
20-
pnpm bootstrap
21-
```
3+
vue useful lib collection, use vue like a superman

package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"author": "yangjinming",
88
"scripts": {
99
"bootstrap": "pnpm i",
10-
"changeset": "changeset",
11-
"ci:version": "changeset version &&pnpm i --no-frozen-lockfile --lockfile-only --ignore-scripts",
10+
"build": "esno ./scripts/build.ts",
1211
"clean": "rimraf **/node_modules/**",
1312
"commit": "git add . &&git-cz",
1413
"lint": "redrun lint:es lint:css lint:dir",
@@ -18,13 +17,10 @@
1817
"lint:es": "eslint --fix . --ext .jsx,.js,.vue,.ts,.tsx,.json",
1918
"preinstall": "npx only-allow pnpm",
2019
"prepare": "husky install",
21-
"publish:all": "pnpm run ci:version &&pnpm -r publish --access public",
2220
"release": "bumpp package.json packages/*/package.json --push --tag --commit \"build: the v%s release\"",
23-
"release:all": "redrun ci:version commit publish:all"
21+
"test": "echo run test"
2422
},
2523
"devDependencies": {
26-
"@changesets/changelog-github": "^0.4.4",
27-
"@changesets/cli": "^2.22.0",
2824
"@commitlint/cli": "^16.2.3",
2925
"@commitlint/config-conventional": "^16.2.1",
3026
"@ls-lint/ls-lint": "^1.11.0",
@@ -49,7 +45,7 @@
4945
"eslint-plugin-react": "^7.29.4",
5046
"eslint-plugin-vue": "^8.6.0",
5147
"esno": "^0.14.1",
52-
"globby": "11.0.4",
48+
"globby": "11.1.0",
5349
"husky": "^7.0.4",
5450
"lint-staged": "^12.3.8",
5551
"ora": "5.4.1",

0 commit comments

Comments
 (0)