Skip to content

Commit f1c6945

Browse files
committed
action
1 parent d6c16e8 commit f1c6945

1 file changed

Lines changed: 38 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ on:
1313
default: 'v1.0.0'
1414

1515
jobs:
16-
build:
17-
name: Build on ${{ matrix.os }}
16+
desktop:
17+
name: Desktop ${{ matrix.os }}
1818
runs-on: ${{ matrix.os }}
1919
strategy:
2020
fail-fast: false
@@ -39,17 +39,48 @@ jobs:
3939
if: contains(matrix.os, 'ubuntu')
4040
run: sudo apt-get install -y libgles2-mesa-dev
4141

42-
- name: Build and Package
43-
run: python3 scripts/build.py
42+
- name: Build Desktop
43+
run: python3 scripts/build.py desktop
4444

4545
- name: Upload Artifacts
4646
uses: actions/upload-artifact@v4
4747
with:
48-
name: live2d-jars-${{ matrix.os }}
48+
name: live2d-desktop-${{ matrix.os }}
49+
path: out/*.jar
50+
51+
android:
52+
name: Android Build
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v4
56+
57+
- name: Set up JDK 21
58+
uses: actions/setup-java@v4
59+
with:
60+
java-version: '21'
61+
distribution: 'temurin'
62+
63+
- name: Set up Python
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: '3.x'
67+
68+
- name: Setup Android NDK
69+
uses: nttld/setup-ndk@v1
70+
with:
71+
ndk-version: r26b
72+
73+
- name: Build Android
74+
run: python3 scripts/build.py android
75+
76+
- name: Upload Artifacts
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: live2d-android
4980
path: out/*.jar
5081

5182
publish:
52-
needs: build
83+
needs: [desktop, android]
5384
runs-on: ubuntu-latest
5485
permissions:
5586
contents: write
@@ -77,4 +108,4 @@ jobs:
77108
draft: false
78109
prerelease: false
79110
env:
80-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)