Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fourcels committed Jan 17, 2023
1 parent 3808851 commit 04c73d0
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 27 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/andorid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,17 @@ jobs:
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
run: ./gradlew assembleRelease

- uses: ilharp/sign-android-release@v1 # Or use @nightly
name: Sign app APK
id: sign_app
with:
releaseDir: app/build/outputs/apk/release
signingKey: ${{ secrets.SIGNING_KEY }}
keyAlias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
buildToolsVersion: 33.0.0

- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: ${{steps.sign_app.outputs.signedFile}}
files: app/build/outputs/apk/release/app-release.apk


2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

[DoubanMovie.apk](https://github.com/fourcels/DoubanMovie/releases/latest/download/app-release-unsigned-signed.apk)

| Light | Dark |
|------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
| <img src="https://user-images.githubusercontent.com/1042568/198966849-90d28c42-3143-4f00-bb44-e8db8889d5ca.png" width="400"> | <img src="https://user-images.githubusercontent.com/1042568/198966875-68a09e19-7a71-494f-b748-463394d0c4a9.png" width="400"> |


https://user-images.githubusercontent.com/1042568/198938918-af6b1df2-8b3c-453c-a2c9-31299cb49ad7.mp4
| Light | Dark |
|-----------------------------------|-----------------------------------------------------------------|
| <img src="/preview/Screenshot_20230117_110657.png" width="400"> | <img src="/preview/Screenshot_20230117_110755.png" width="400"> |

12 changes: 11 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'org.jetbrains.kotlin.android'
}


android {
namespace 'com.example.doubanmovie'
compileSdk 33
Expand All @@ -20,10 +21,20 @@ android {
}
}

signingConfigs {
release {
storeFile file('../release.jks')
storePassword System.getenv('STORE_PASSWORD')
keyPassword System.getenv('KEY_PASSWORD')
keyAlias System.getenv('KEY_ALIAS')
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
compileOptions {
Expand All @@ -32,7 +43,6 @@ android {
}
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs = ["-Xopt-in=kotlin.RequiresOptIn"]
}
buildFeatures {
compose true
Expand Down
5 changes: 0 additions & 5 deletions app/src/main/java/com/example/doubanmovie/ui/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,9 @@ private val LightColorScheme = lightColorScheme(
@Composable
fun DoubanMovieTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
dynamicColor: Boolean = true,
content: @Composable () -> Unit
) {
val colorScheme = when {
// dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
// val context = LocalContext.current
// if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
// }
darkTheme -> DarkColorScheme
else -> LightColorScheme
}
Expand Down
Binary file added preview/Screenshot_20230117_110657.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/Screenshot_20230117_110730.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/Screenshot_20230117_110755.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release.jks
Binary file not shown.

0 comments on commit 04c73d0

Please sign in to comment.