Skip to content

Commit 62c83b4

Browse files
committed
chore: add workflows
1 parent c5de7c1 commit 62c83b4

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint files
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
12+
- name: Install pnpm
13+
run: corepack enable && corepack prepare [email protected] --activate
14+
15+
- name: Set node version to 18
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 18
19+
cache: pnpm
20+
21+
- name: Install dependencies
22+
run: pnpm install --no-frozen-lockfile
23+
24+
- name: Run formatter
25+
run: pnpm format
26+
27+
- name: Run linter
28+
run: pnpm lint

.github/workflows/release-tag.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Create Release Tag
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release-tag:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@master
14+
15+
- name: Create Release Tag
16+
id: release_tag
17+
uses: yyx990803/release-tag@master
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
with:
21+
tag_name: ${{ github.ref }}
22+
body: |
23+
更新内容请查看[CHANGELOG](https://github.com/chouchouji/alias-manager/blob/main/CHANGELOG.md)。
24+
Please refer to [CHANGELOG](https://github.com/chouchouji/alias-manager/blob/main/CHANGELOG.md) for details.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
"eslint --fix"
141141
]
142142
},
143+
"packageManager": "[email protected]",
143144
"scripts": {
144145
"postinstall": "simple-git-hooks",
145146
"vscode:prepublish": "pnpm run package",
@@ -151,7 +152,7 @@
151152
"compile-tests": "tsc -p . --outDir out",
152153
"watch-tests": "tsc -p . -w --outDir out",
153154
"pretest": "pnpm run compile-tests && pnpm run compile && pnpm run lint",
154-
"lint": "eslint src",
155+
"lint": "eslint src --fix",
155156
"format": "prettier . --write",
156157
"test": "vscode-test"
157158
},

0 commit comments

Comments
 (0)