mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 18:59:40 +08:00
构建工作流
This commit is contained in:
parent
18ef724dc7
commit
4d3e6f8166
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@ -6,8 +6,7 @@ name: Node.js CI
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "dev" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
paths: ["version"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -21,6 +20,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: version
|
||||
id: version
|
||||
run: |
|
||||
version=$(cat version |sed -ne "s/VERSION\s=\s'v\(.*\)'/\1/gp")
|
||||
echo "version=$version" >> $GITHUB_ENV
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
@ -30,7 +34,7 @@ jobs:
|
||||
run: npm install
|
||||
# Actions构建
|
||||
- name: Build
|
||||
run: npm run actions
|
||||
run: npm run actions --tag=${{ env.version }}
|
||||
# 上传构建产物zip
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
@ -149,7 +149,7 @@ task('default', series('clean', parallel('css', 'js'), 'zip'))
|
||||
task('release', series('clean', 'version', parallel('css', 'js'), 'zip'))
|
||||
|
||||
// GitHub - Actions模式
|
||||
task('actions', series('clean', parallel('css', 'js'), 'actions-build'))
|
||||
task('actions', series('clean', 'version', parallel('css', 'js'), 'actions-build'))
|
||||
|
||||
// push模式,需要使用--tag参数指定版本号
|
||||
task('push', series('clean', 'version', parallel('css', 'js'), 'zip', 'publish'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user