GoGoGo/.github/workflows/android.yml
2022-06-17 10:32:48 +08:00

46 lines
1.3 KiB
YAML
Raw 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 GoGoGo
# 在 on 字段下列举触发条件(事件),可以有多种
on:
# 手动使用 Github WebUI 触发
workflow_dispatch:
# 仓库收到 Push 时触发
push:
tags:
- 'Release*'
# 仓库收到 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@v3
# 设置 JDK
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
# 给 gradlew 增加执行权限
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# 启动构建
- name: Build with Gradle
run: ./gradlew build