Skip to content

Commit 92772f2

Browse files
authored
修复ci构建问题 (#299)
1 parent 20bd6ec commit 92772f2

6 files changed

Lines changed: 19 additions & 13 deletions

File tree

.github/workflows/alpha.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ on:
44
workflow_call:
55

66
jobs:
7-
alpha:
7+
publish-alpha:
88
runs-on: ubuntu-latest
99
permissions:
1010
contents: write
1111

1212
steps:
13+
- name: Checkout source code
14+
uses: actions/checkout@v4
15+
1316
- uses: actions/download-artifact@v4
1417
with:
1518
name: outputs
@@ -32,8 +35,7 @@ jobs:
3235
3336
- name: Delete alpha using GitHub CLI
3437
run: |
35-
gh release delete alpha --yes >/dev/null 2>&1 || echo "No alpha release exists."
36-
gh api -X DELETE repos/${GITHUB_REPOSITORY}/git/refs/tags/alpha >/dev/null 2>&1 || echo "No alpha tag exists."
38+
gh release delete alpha --yes --cleanup-tag >/dev/null 2>&1 || echo "No alpha release exists."
3739
env:
3840
GITHUB_TOKEN: ${{ github.token }}
3941

.github/workflows/beta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55

66
jobs:
7-
beta:
7+
publish-beta:
88
runs-on: ubuntu-latest
99
environment: beta
1010

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55

66
jobs:
7-
build:
7+
build-apk:
88
runs-on: ubuntu-latest
99
timeout-minutes: 60
1010

@@ -18,7 +18,6 @@ jobs:
1818
uses: actions/cache@v4
1919
with:
2020
path: |
21-
~/.gradle
2221
${{ github.workspace }}/node_modules
2322
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
2423
restore-keys: |

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,28 @@ on:
1111
jobs:
1212
build:
1313
uses: ./.github/workflows/build.yml
14+
secrets: inherit
1415

1516
alpha:
1617
if: github.ref == 'refs/heads/master'
1718
needs: build
1819
uses: ./.github/workflows/alpha.yml
20+
secrets: inherit
1921

2022
beta:
2123
if: github.event_name == 'workflow_dispatch'
2224
needs: build
2325
uses: ./.github/workflows/beta.yml
26+
secrets: inherit
2427

2528
release:
2629
if: startsWith(github.ref, 'refs/tags/')
2730
needs: build
2831
uses: ./.github/workflows/release.yml
32+
secrets: inherit
2933

3034
version:
3135
if: startsWith(github.ref, 'refs/tags/')
3236
needs: release
3337
uses: ./.github/workflows/version.yml
38+
secrets: inherit

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@ on:
44
workflow_call:
55

66
jobs:
7-
release:
7+
publish-release:
88
runs-on: ubuntu-latest
99
permissions:
1010
contents: write
1111

1212
steps:
13+
- name: Checkout source code
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
1318
- uses: actions/download-artifact@v4
1419
with:
1520
name: outputs
@@ -25,11 +30,6 @@ jobs:
2530
echo "apk_filename=$APK_FILENAME" >> "$GITHUB_OUTPUT"
2631
mv $GITHUB_WORKSPACE/outputs/apk/release/app-arm64-v8a-release.apk $APK_FILENAME
2732
28-
- name: Checkout source code
29-
uses: actions/checkout@v4
30-
with:
31-
fetch-depth: 0
32-
3333
- name: Get version info
3434
id: version-info
3535
run: |

.github/workflows/version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55

66
jobs:
7-
bump:
7+
bump-version:
88
runs-on: ubuntu-latest
99
permissions:
1010
contents: write

0 commit comments

Comments
 (0)