Skip to content

Commit f0af77d

Browse files
committed
ci: update ci
1 parent eb0f54c commit f0af77d

File tree

4 files changed

+127
-61
lines changed

4 files changed

+127
-61
lines changed

.eslintrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"node": true
5+
},
6+
"extends": [
7+
"plugin:vue/vue3-essential",
8+
"eslint:recommended",
9+
"@vue/typescript/recommended"
10+
],
11+
"parserOptions": {
12+
"parser": "@typescript-eslint/parser"
13+
},
14+
"rules": {
15+
"semi": [ 1, "always" ],
16+
"quotes": [ 1, "single" ]
17+
}
18+
}

.github/workflows/action.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Update Frontend'
1+
name: 'Release'
22
on:
33
push:
44
branches:
@@ -7,9 +7,22 @@ jobs:
77
Update_Frontend:
88
runs-on: ubuntu-latest
99
steps:
10-
- name: 'Repository Dispatch'
11-
uses: peter-evans/repository-dispatch@v1
10+
- name: 'Checkout Codes'
11+
uses: actions/checkout@v2
12+
13+
- name: 'Setup Node.js'
14+
uses: actions/setup-node@v2
1215
with:
13-
token: ${{ secrets.REPO_ACCESS_TOKEN }}
14-
repository: CokeMine/ServerStatus-Hotaru
15-
event-type: Build Frontend
16+
node-version: '14'
17+
18+
- name: 'Build'
19+
run: |
20+
npm ci
21+
npm run build --if-present
22+
mv dist hotaru-theme
23+
zip -r -9 hotaru-theme.zip ./hotaru-theme
24+
25+
- name: 'Release'
26+
run: npx semantic-release
27+
env:
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"branches": [
3+
"main",
4+
"dev"
5+
],
6+
"ci": "true",
7+
"plugins": [
8+
"@semantic-release/release-notes-generator",
9+
"@semantic-release/changelog",
10+
[
11+
"@semantic-release/commit-analyzer",
12+
{
13+
"preset": "angular",
14+
"releaseRules": [
15+
{
16+
"type": "*",
17+
"release": "patch"
18+
}
19+
],
20+
"parserOpts": {
21+
"noteKeywords": [
22+
"BREAKING CHANGE",
23+
"BREAKING CHANGES"
24+
]
25+
}
26+
}
27+
],
28+
[
29+
"@semantic-release/git",
30+
{
31+
"assets": [
32+
"CHANGELOG.md"
33+
],
34+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
35+
}
36+
],
37+
[
38+
"@semantic-release/github",
39+
{
40+
"assets": {
41+
"path": "hotaru-theme.zip",
42+
"name": "hotaru-theme.zip"
43+
}
44+
}
45+
]
46+
]
47+
}

package.json

Lines changed: 43 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,43 @@
1-
{
2-
"name": "hotaru_theme",
3-
"version": "0.3.1",
4-
"private": true,
5-
"scripts": {
6-
"serve": "vue-cli-service serve",
7-
"build": "vue-cli-service build",
8-
"lint": "vue-cli-service lint"
9-
},
10-
"dependencies": {
11-
"axios": "^0.21.1",
12-
"core-js": "^3.8.3",
13-
"semantic-ui-css": "^2.4.1",
14-
"vue": "^3.0.0",
15-
"vue-class-component": "^8.0.0-0"
16-
},
17-
"devDependencies": {
18-
"@types/axios": "^0.14.0",
19-
"@typescript-eslint/eslint-plugin": "^2.33.0",
20-
"@typescript-eslint/parser": "^2.33.0",
21-
"@vue/cli-plugin-babel": "~4.5.11",
22-
"@vue/cli-plugin-eslint": "~4.5.11",
23-
"@vue/cli-plugin-typescript": "^4.5.11",
24-
"@vue/cli-service": "~4.5.11",
25-
"@vue/compiler-sfc": "^3.0.5",
26-
"@vue/eslint-config-typescript": "^7.0.0",
27-
"babel-eslint": "^10.1.0",
28-
"eslint": "^7.19.0",
29-
"eslint-plugin-vue": "^7.5.0",
30-
"typescript": "~4.1.3"
31-
},
32-
"eslintConfig": {
33-
"root": true,
34-
"env": {
35-
"node": true
36-
},
37-
"extends": [
38-
"plugin:vue/vue3-essential",
39-
"eslint:recommended",
40-
"@vue/typescript/recommended"
41-
],
42-
"parserOptions": {
43-
"parser": "@typescript-eslint/parser"
44-
},
45-
"rules": {
46-
"semi": [1, "always"],
47-
"quotes": [1, "single"]
48-
}
49-
},
50-
"browserslist": [
51-
"> 1%",
52-
"last 2 versions",
53-
"not dead"
54-
]
55-
}
1+
{
2+
"name": "hotaru_theme",
3+
"version": "0.3.1",
4+
"private": true,
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/CokeMine/Hotaru_theme.git"
8+
},
9+
"scripts": {
10+
"serve": "vue-cli-service serve",
11+
"build": "vue-cli-service build",
12+
"lint": "vue-cli-service lint",
13+
"semantic-release": "semantic-release"
14+
},
15+
"dependencies": {
16+
"axios": "^0.21.1",
17+
"core-js": "^3.8.3",
18+
"semantic-ui-css": "^2.4.1",
19+
"vue": "^3.0.0",
20+
"vue-class-component": "^8.0.0-0"
21+
},
22+
"devDependencies": {
23+
"@types/axios": "^0.14.0",
24+
"@typescript-eslint/eslint-plugin": "^2.33.0",
25+
"@typescript-eslint/parser": "^2.33.0",
26+
"@vue/cli-plugin-babel": "~4.5.11",
27+
"@vue/cli-plugin-eslint": "~4.5.11",
28+
"@vue/cli-plugin-typescript": "^4.5.11",
29+
"@vue/cli-service": "~4.5.11",
30+
"@vue/compiler-sfc": "^3.0.5",
31+
"@vue/eslint-config-typescript": "^7.0.0",
32+
"babel-eslint": "^10.1.0",
33+
"eslint": "^7.19.0",
34+
"eslint-plugin-vue": "^7.5.0",
35+
"typescript": "~4.1.3",
36+
"semantic-release": "^17.4.2"
37+
},
38+
"browserslist": [
39+
"> 1%",
40+
"last 2 versions",
41+
"not dead"
42+
]
43+
}

0 commit comments

Comments
 (0)