mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 17:49:40 +08:00
工作流
This commit is contained in:
parent
88e3f2f606
commit
acff9dbcd5
@ -28,8 +28,9 @@ jobs:
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
# Actions构建
|
||||
- name: Build
|
||||
run: npm run build
|
||||
run: npm run actions
|
||||
# 上传构建产物zip
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
@ -129,6 +129,12 @@ task('zip', () => {
|
||||
.pipe(dest(distPath))
|
||||
})
|
||||
|
||||
task('actions-build', () => {
|
||||
const target = ['./templates/**', './*.yaml', 'README.md', 'LICENSE']
|
||||
return src(target, {base: '.'})
|
||||
.pipe(dest(distPath))
|
||||
})
|
||||
|
||||
task('publish', (done) => {
|
||||
// 需要将tag标签内容置为 latest
|
||||
process.env.npm_config_tag = 'latest'
|
||||
@ -142,5 +148,8 @@ task('default', series('clean', parallel('css', 'js'), 'zip'))
|
||||
// release模式,需要使用--tag参数指定版本号
|
||||
task('release', series('clean', 'version', parallel('css', 'js'), 'zip'))
|
||||
|
||||
// GitHub - Actions模式
|
||||
task('actions', series('clean', parallel('css', 'js'), 'actions-build'))
|
||||
|
||||
// push模式,需要使用--tag参数指定版本号
|
||||
task('push', series('clean', 'version', parallel('css', 'js'), 'zip', 'publish'))
|
||||
|
@ -7,6 +7,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"release": "eslint src/**/*.js && gulp release",
|
||||
"actions": "eslint src/**/*.js && gulp actions",
|
||||
"push": "eslint src/**/*.js && gulp push",
|
||||
"zip": "gulp zip",
|
||||
"build": "eslint src/**/*.js && gulp",
|
||||
|
Loading…
x
Reference in New Issue
Block a user