mirror of
http://gitea.winboll.cc/Studio/WinBoLL.git
synced 2026-06-29 20:12:23 +08:00
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
# This workflow uses actions that are not certified by GitHub.
|
||
# They are provided by a third-party and are governed by
|
||
# separate terms of service, privacy policy, and support
|
||
# documentation.
|
||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
||
|
||
name: Java CI with Gradle
|
||
|
||
on:
|
||
push:
|
||
branches: [ "appbase" ]
|
||
pull_request:
|
||
branches: [ "appbase" ]
|
||
|
||
jobs:
|
||
build:
|
||
runs-on: ubuntu-latest
|
||
permissions:
|
||
contents: read
|
||
dependency-graph: write
|
||
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- name: Set up JDK 17
|
||
uses: actions/setup-java@v4
|
||
with:
|
||
java-version: '17'
|
||
distribution: 'temurin'
|
||
|
||
# Configure Gradle cache
|
||
- name: Setup Gradle
|
||
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
|
||
|
||
# 增加 --no-daemon 禁用守护进程,CI环境稳定编译
|
||
- name: Build with Gradle Wrapper
|
||
run: ./gradlew build --no-daemon
|
||
|
||
dependency-submission:
|
||
runs-on: ubuntu-latest
|
||
# 补齐必备权限
|
||
permissions:
|
||
contents: read
|
||
dependency-graph: write
|
||
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- name: Set up JDK 17
|
||
uses: actions/setup-java@v4
|
||
with:
|
||
java-version: '17'
|
||
distribution: 'temurin'
|
||
|
||
# 生成并提交依赖图谱
|
||
- name: Generate and submit dependency graph
|
||
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
|