Skip to content

Commit 4551f70

Browse files
committed
fix: github action
1 parent d7e8e9f commit 4551f70

9 files changed

Lines changed: 123 additions & 288 deletions

File tree

.github/workflows/README.md

Lines changed: 0 additions & 105 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ jobs:
2121

2222
- name: Setup Gradle
2323
uses: gradle/actions/setup-gradle@v3
24+
with:
25+
cache-enabled: true
26+
cache-read-only: ${{ github.event_name == 'pull_request' }}
2427

2528
- name: Grant execute permission for gradlew
2629
run: chmod +x gradlew
2730

2831
- name: Run Gradle Build
2932
run: ./gradlew assembleDebug
30-

.github/workflows/lang.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 33 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,53 @@
1-
name: Publish Releases
1+
name: CI
22

33
on:
44
push:
5-
tags:
6-
- "v*"
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
712

813
jobs:
9-
build-and-publish-github-release:
10-
name: Build and publish GitHub release
14+
build:
15+
name: Build & Lint
1116
runs-on: ubuntu-latest
12-
permissions:
13-
contents: write
1417

1518
steps:
16-
- name: Checkout code
19+
- name: Checkout
1720
uses: actions/checkout@v4
1821

19-
- name: Set up JDK
22+
- name: Set up JDK 17
2023
uses: actions/setup-java@v4
2124
with:
22-
distribution: 'temurin'
2325
java-version: '17'
26+
distribution: 'temurin'
2427

25-
- name: Setup Gradle
26-
uses: gradle/actions/setup-gradle@v3
27-
28-
- name: Grant Permission to Execute
29-
run: chmod +x gradlew
30-
31-
- name: Decode GitHub Release Keystore
32-
env:
33-
ENCODED_KEYSTORE: ${{ secrets.ENCODED_KEYSTORE }}
34-
run: |
35-
echo $ENCODED_KEYSTORE | base64 -d > app/keystore
36-
37-
- name: Build Signed Release APK and AAB
38-
env:
39-
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
40-
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
41-
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
42-
run: ./gradlew assembleRelease bundleRelease
43-
44-
- name: Upload Build Artifacts
45-
uses: actions/upload-artifact@v4
28+
- name: Cache Gradle
29+
uses: actions/cache@v4
4630
with:
47-
name: release-builds
4831
path: |
49-
app/build/outputs/apk/release/app-release.apk
50-
app/build/outputs/bundle/release/app-release.aab
51-
52-
- name: Get version name
53-
id: get_version
54-
run: |
55-
VERSION_NAME=$(echo ${GITHUB_REF#refs/tags/})
56-
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
57-
58-
- name: Create GitHub Release
59-
id: create_release
60-
uses: softprops/action-gh-release@v1
61-
with:
62-
name: Release ${{ env.VERSION_NAME }}
63-
draft: false
64-
prerelease: false
65-
files: app/build/outputs/apk/release/app-release.apk
66-
token: ${{ secrets.GITHUB_TOKEN }}
67-
68-
- name: Cleanup sensitive files
69-
run: |
70-
rm -f play-store-config.json
71-
rm -f app/keystore
72-
73-
build-and-publish-play-store:
74-
name: Build and publish to Play Store
75-
runs-on: ubuntu-latest
76-
needs: build-and-publish-github-release
77-
78-
steps:
79-
- name: Checkout code
80-
uses: actions/checkout@v4
81-
82-
- name: Set up JDK
83-
uses: actions/setup-java@v4
84-
with:
85-
distribution: 'temurin'
86-
java-version: '17'
32+
~/.gradle/wrapper
33+
~/.gradle/caches
34+
~/.gradle/daemon
35+
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle.kts', '**/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}
36+
restore-keys: |
37+
gradle-${{ runner.os }}-
38+
39+
- name: Grant execute permission
40+
run: chmod +x gradlew
8741

88-
- name: Set up Ruby and Bundler
89-
uses: ruby/setup-ruby@v1
90-
with:
91-
ruby-version: '3.2'
92-
bundler-cache: true
42+
- name: Lint
43+
run: ./gradlew lint
9344

94-
- name: Setup Fastlane
95-
run: gem install fastlane
45+
- name: Build debug APK
46+
run: ./gradlew assembleDebug
9647

97-
- name: Download Build Artifacts
98-
uses: actions/download-artifact@v4
48+
- name: Upload debug APK
49+
uses: actions/upload-artifact@v4
9950
with:
100-
name: release-builds
101-
102-
- name: Decode service account key
103-
env:
104-
PLAY_STORE_CONFIG_JSON: ${{ secrets.PLAY_STORE_CONFIG_JSON }}
105-
run: echo $PLAY_STORE_CONFIG_JSON > play-store-config.json
106-
107-
- name: Decode GitHub Release Keystore
108-
env:
109-
ENCODED_KEYSTORE: ${{ secrets.ENCODED_KEYSTORE }}
110-
run: |
111-
echo $ENCODED_KEYSTORE | base64 -d > app/keystore
112-
113-
- name: Deploy to Play Store (All Tracks)
114-
env:
115-
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
116-
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
117-
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
118-
run: fastlane android release_all
119-
120-
- name: Cleanup sensitive files
121-
run: |
122-
rm -f play-store-config.json
123-
rm -f app/keystore
51+
name: debug-apk
52+
path: app/build/outputs/apk/debug/app-debug.apk
53+
retention-days: 7

app/src/main/java/org/nqmgaming/aneko/presentation/explore/ExploreSkinScreen.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ fun ExploreSkin(
196196
),
197197
)
198198
},
199+
navigationIcon = {
200+
IconButton(onClick = { isShowInfoDialog = true }) {
201+
Icon(
202+
imageVector = Icons.Default.Info,
203+
contentDescription = null
204+
)
205+
}
206+
},
199207
actions = {
200208
IconButton(onClick = {
201209
context.openUrl(context.getStringResource(R.string.skin_share_url))
@@ -213,12 +221,6 @@ fun ExploreSkin(
213221
contentDescription = null
214222
)
215223
}
216-
IconButton(onClick = { isShowInfoDialog = true }) {
217-
Icon(
218-
imageVector = Icons.Default.Info,
219-
contentDescription = null
220-
)
221-
}
222224
}
223225
)
224226
}

app/src/main/java/org/nqmgaming/aneko/presentation/explore/component/ExploreItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fun ExploreItem(
8383
modifier = Modifier
8484
.size(60.dp)
8585
.background(
86-
color = MaterialTheme.colorScheme.onSurface,
86+
color = MaterialTheme.colorScheme.primary.copy(alpha = 0.2f),
8787
shape = RoundedCornerShape(12.dp)
8888
)
8989
.clip(

fastlane/Appfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
package_name("org.nqmgaming.aneko")
2-
json_key_file("play-store-config.json")
2+
json_key_file("fastlane/play-store-key.json")

0 commit comments

Comments
 (0)