Skip to content

Commit ae2e8cc

Browse files
authored
Merge pull request #734 from lings03/ci
修复Actions构建
2 parents b5c650a + b9ba861 commit ae2e8cc

2 files changed

Lines changed: 12 additions & 20 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,39 @@ on:
2121
env:
2222
ORIGINAL_PROJECT: "CeuiLiSA/Pixiv-Shaft"
2323

24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.ref }}
26+
cancel-in-progress: true
27+
2428
jobs:
2529
build:
2630
name: Build apk
2731
runs-on: ubuntu-24.04
2832
steps:
29-
- name: Cancel previous runs
30-
uses: styfle/cancel-workflow-action@0.5.0
31-
with:
32-
access_token: ${{ github.token }}
33-
3433
- name: Clone repo
3534
uses: actions/checkout@v4
3635
with:
3736
submodules: 'true'
3837
fetch-depth: 0
3938

40-
- name: set up JDK 21
39+
- name: Set up JDK 21
4140
uses: actions/setup-java@v4.2.2
4241
with:
4342
java-version: '21'
4443
distribution: 'adopt'
4544

45+
- name: Set up Gradle
46+
uses: gradle/actions/setup-gradle@v3
47+
4648
- name: Grant execute permission for gradlew
4749
run: chmod +x gradlew
4850

4951
- name: Build debug apk
50-
uses: eskatos/gradle-command-action@v1
51-
with:
52-
arguments: assembleDebug
53-
distributions-cache-enabled: true
54-
dependencies-cache-enabled: true
55-
configuration-cache-enabled: true
52+
run: ./gradlew assembleDebug
5653

5754
- name: Upload artifact
58-
uses: actions/upload-artifact@v4
5955
if: ${{ !github.head_ref }}
56+
uses: actions/upload-artifact@v4
6057
with:
6158
name: apk-debug
6259
path: app/build/outputs/apk/debug
@@ -73,12 +70,7 @@ jobs:
7370
7471
- name: Build release apk
7572
if: startsWith(github.ref, 'refs/tags/') && github.repository == env.ORIGINAL_PROJECT
76-
uses: eskatos/gradle-command-action@v1
77-
with:
78-
arguments: assembleRelease
79-
distributions-cache-enabled: true
80-
dependencies-cache-enabled: true
81-
configuration-cache-enabled: true
73+
run: ./gradlew assembleRelease
8274

8375
- name: Deal with release apk
8476
if: startsWith(github.ref, 'refs/tags/') && github.repository == env.ORIGINAL_PROJECT

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ dependencies {
196196
implementation project(path: ':flowlayout-lib')
197197
implementation 'com.waynejo:androidndkgif:0.3.3'
198198
implementation 'com.tencent:mmkv-static:1.3.9'
199-
implementation 'com.github.tbruyelle:rxpermissions:0.12'
199+
implementation 'com.github.tbruyelle:RxPermissions:0.12'
200200

201201
implementation 'androidx.webkit:webkit:1.12.1'
202202
implementation 'org.jsoup:jsoup:1.18.1'

0 commit comments

Comments
 (0)