GoGoGo/.github/workflows/build-check.yml
dependabot[bot] f131ee5864
chore(deps): bump actions/setup-java from 4 to 5
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-26 08:35:58 +00:00

56 lines
1.5 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# name 字段用于指定 Workflow 的名字
name: Build Check
# 在 on 字段下列举触发条件(事件),可以有多种
on:
# 手动使用 Github WebUI 触发
workflow_dispatch:
# 仓库收到 Push 时触发
push:
branches:
- master
# 仓库收到 pull_request 时触发
pull_request:
branches:
- master
# 一个 workflow 执行一个或多个 job这些 job 被组织在 jobs 字段下
jobs:
# 一个名为 build 的 job。每一个Job都是并发执行的并不是按照申明的先后顺序执行的
# 如果多个job 之间存在依赖关系,需要使用 needs例如
# job1:
# xxx
# job2:
# needs: job1
# xxx
build:
# 该 job 运行的系统环境,支持 ubuntu 、windows、macOS
runs-on: ubuntu-latest
# 该 job 的一系列步骤。每个以“-”开头
steps:
# 检出我们的源代码
- uses: actions/checkout@v5
# 设置 JDK
- name: set up JDK 17
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
# 创建 local.properties 文件
- name: Create local.properties
run: |
cat << EOF > local.properties
MAPS_API_KEY=${{ secrets.MAPS_API_KEY }}
MAPS_SAFE_CODE=${{ secrets.MAPS_SAFE_CODE }}
EOF
# 给 gradlew 增加执行权限
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# 启动构建
- name: Build with Gradle
run: ./gradlew build