[build]github Action CI

添加Action CI
This commit is contained in:
zhouzichun 2022-02-07 19:57:59 +08:00
parent 0bac283864
commit c671c23e87
3 changed files with 10428 additions and 0 deletions

30
.github/workflows/maven.yml vendored Normal file
View File

@ -0,0 +1,30 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ master ]
# pull_request:
# branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17' ]
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.Java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml -Dmaven.test.skip=true

51
.github/workflows/yudao-ui-admin.yml vendored Normal file
View File

@ -0,0 +1,51 @@
name: yudao-ui-admin CI
# 在master分支发生push事件时触发。
on:
push:
branches: [ master ]
# pull_request:
# branches: [ master ]
env: # 设置环境变量
TZ: Asia/Shanghai # 时区(设置时区可使页面中的`最近更新时间`使用时区时间)
WORK_DIR: yudao-ui-admin #工作目录
defaults:
run:
shell: bash
working-directory: yudao-ui-admin
jobs:
build: # 自定义名称
runs-on: ubuntu-latest # 运行在虚拟机环境ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout # 步骤1
uses: actions/checkout@v2 # 使用的动作。格式userName/repoName。作用检出仓库获取源码。 官方actions库https://github.com/actions
- name: Install pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 6.15.1
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
cache: "pnpm"
cache-dependency-path: yudao-ui-admin/pnpm-lock.yaml
- name: Install deps
run: pnpm install
- name: Build
run: pnpm run build:prod
# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages

10347
yudao-ui-admin/pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff