mirror of
http://gitea.winboll.cc/Studio/WinBoLL.git
synced 2026-06-29 03:59:53 +08:00
Update gradle.yml
This commit is contained in:
18
.github/workflows/gradle.yml
vendored
18
.github/workflows/gradle.yml
vendored
@@ -10,6 +10,8 @@ name: Java CI with Gradle
|
||||
on:
|
||||
push:
|
||||
branches: [ "appbase" ]
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches: [ "appbase" ]
|
||||
|
||||
@@ -17,7 +19,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -32,8 +34,18 @@ jobs:
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
|
||||
|
||||
- name: Build with Gradle Wrapper
|
||||
run: ./gradlew build --no-daemon
|
||||
# 编译任务改为 assembleStageRelease
|
||||
- name: Build Stage Release APK
|
||||
run: ./gradlew assembleStageRelease --no-daemon
|
||||
|
||||
# 构建成功后,把APK上传到本次tag对应的Release Assets
|
||||
- name: Upload APK to GitHub Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: app/build/outputs/apk/stageRelease/*.apk
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html).
|
||||
# If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version.
|
||||
|
||||
Reference in New Issue
Block a user