2024-05-11 07:03:56 +08:00
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name : Node.js CI
on :
push :
branches : [ "master" ]
pull_request :
branches : [ "master" ]
jobs :
build :
runs-on : ubuntu-latest
strategy :
matrix :
2024-05-11 08:07:20 +08:00
node-version : [ 20. x]
2024-05-11 07:03:56 +08:00
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps :
- uses : actions/checkout@v4
- name : Use Node.js ${{ matrix.node-version }}
2024-05-11 08:07:20 +08:00
uses : actions/setup-node@v4
2024-05-11 07:03:56 +08:00
with :
node-version : ${{ matrix.node-version }}
cache : 'npm'
2024-05-11 07:07:41 +08:00
- name : Install dependencies
2024-05-11 07:08:21 +08:00
run : npm install
2024-05-11 07:18:27 +08:00
- name : Build
run : npm run build
2024-05-11 07:59:13 +08:00
# 上传构建产物zip
2024-05-11 07:34:18 +08:00
- name : Upload artifacts
2024-05-11 08:09:16 +08:00
uses : actions/upload-artifact@v4
2024-05-11 07:34:18 +08:00
with :
name : halo-theme-dream2.0-plus
path : dist