Skip to content

Commit 5241bc1

Browse files
authored
Update android-build.yml
1 parent 49a9963 commit 5241bc1

File tree

1 file changed

+3
-73
lines changed

1 file changed

+3
-73
lines changed
Lines changed: 3 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: Android Build (Gradle 9.2.1)
1+
name: test build
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ SkinViewAndroidTest ]
66
pull_request:
77

88
jobs:
@@ -16,93 +16,23 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818

19-
- name: Clear Gradle cache
20-
run: rm -rf ~/.gradle/caches && rm -rf .gradle && rm -rf build
21-
22-
2319
# 2. JDK 17 セットアップ
2420
- name: Set up JDK 17
2521
uses: actions/setup-java@v4
2622
with:
2723
distribution: temurin
2824
java-version: 17
2925

30-
# 4. バージョン文字列とコード生成(ビルド番号+日付時刻 JST)
31-
- name: Generate version info
32-
id: version
33-
run: |
34-
BUILD=${{ github.run_number }}
35-
DATE=$(TZ=Asia/Tokyo date +'%Y.%m%d.%H%M%S')
36-
VERSION_NAME="${BUILD}.${DATE}"
37-
VERSION_CODE=$BUILD
38-
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
39-
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
40-
echo "Version name: $VERSION_NAME"
41-
echo "Version code: $VERSION_CODE"
42-
4326
- name: Gradlewアクセス許可
4427
run: chmod +x gradlew && chmod +x ./gradlew
4528

4629
# 6. Build Release APK
4730
- name: Build Release APK
4831
run: ./gradlew clean assembleRelease --refresh-dependencies -PversionName=${{ env.VERSION_NAME }} -PversionCode=${{ env.VERSION_CODE }}
4932

50-
- name: Set up Android SDK Build Tools
51-
uses: android-actions/setup-android@v2
52-
with:
53-
api-level: 33
54-
build-tools: 33.0.2
55-
license-accept: true
56-
57-
- name: Install build-tools 33.0.2
58-
run: |
59-
sdkmanager --install "build-tools;33.0.2"
60-
61-
# 8. Keystore 復元
62-
- name: Restore keystore
63-
run: |
64-
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > my-release-key.jks
65-
66-
# 9. APK 署名
67-
- name: Sign APK
68-
run: |
69-
APK_UNSIGN=app/build/outputs/apk/release/app-release-unsigned.apk
70-
APK_SIGNED=output/JavaSkinChanger-latest.apk
71-
mkdir -p output
72-
yes | $ANDROID_HOME/build-tools/33.0.2/apksigner sign \
73-
--ks my-release-key.jks \
74-
--ks-pass pass:${{ secrets.KEYSTORE_PASSWORD }} \
75-
--key-pass pass:${{ secrets.KEY_ALIAS_PASSWORD }} \
76-
--out $APK_SIGNED \
77-
$APK_UNSIGN
78-
79-
- name: Release
80-
uses: ncipollo/release-action@v1
81-
with:
82-
tag: BETA
83-
name: JavaSkinChanger Release - ${{ env.VERSION_NAME }}
84-
artifacts: output/JavaSkinChanger-latest.apk
85-
allowUpdates: true
86-
replacesArtifacts: true
87-
prerelease: true
88-
89-
- name: archive
90-
uses: ncipollo/release-action@v1
91-
with:
92-
tag: v-${{ env.VERSION_CODE }}
93-
name: JavaSkinChanger Archive - ${{ env.VERSION_NAME }}
94-
artifacts: output/JavaSkinChanger-latest.apk
95-
allowUpdates: true
96-
prerelease: true
97-
9833
- name: Upload APK artifact
9934
uses: actions/upload-artifact@v4
10035
with:
10136
name: JSC-APKZIP
10237
path: output/JavaSkinChanger-latest.apk
103-
104-
- name: List all native libs
105-
run: unzip -l output/JavaSkinChanger-latest.apk | grep "\.so" || true && unzip -l output/JavaSkinChanger-latest.apk | grep gdx || true && unzip -l output/JavaSkinChanger-latest.apk | grep libgdx.so || true
106-
107-
108-
38+

0 commit comments

Comments
 (0)