mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 20:33:03 +00:00
46 lines
912 B
YAML
46 lines
912 B
YAML
name: 编译项目
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
paths-ignore:
|
|
- 'bin/**'
|
|
- '.github/**'
|
|
- '.mvn/**'
|
|
- '.run/**'
|
|
- '.vscode/**'
|
|
- '*.txt'
|
|
- '*.md'
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 检出代码
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 设置 Java 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
|
|
- name: 缓存 Maven 依赖
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.m2
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: ${{ runner.os }}-m2
|
|
|
|
- name: 编译项目
|
|
run: ./mvnw clean compile
|
|
|
|
# - name: 运行测试
|
|
# run: ./mvnw test
|
|
|
|
# - name: 打包项目
|
|
# run: ./mvnw package -DskipTests
|