Skip to content

Commit

Permalink
Fix some CI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Iamlooker committed Jul 9, 2024
1 parent 3dd16c0 commit d769073
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 49 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
with:
submodules: true

- name: Validate Gradle Wrapper
uses: gradle/actions/setup-gradle@v3

- name: Setup Gradle
uses: gradle/wrapper-validation-action@v3

- name: Set up Java 17
uses: actions/setup-java@v4
with:
Expand All @@ -58,6 +64,7 @@ jobs:
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEYSTORE_PASS }}
keyPassword: ${{ secrets.KEYSTORE_PASS }}

- name: Remove file that aren't signed
continue-on-error: true
run: |
Expand All @@ -66,5 +73,5 @@ jobs:
- name: Upload the APK
uses: actions/upload-artifact@v4
with:
name: Droid-ify-Debug
name: debug
path: app/build/outputs/apk/debug/app-debug*.apk
93 changes: 47 additions & 46 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Build Release APK

on:
on:
workflow_dispatch:
push:
tags:
- '*'

concurrency:
concurrency:
group: "release-build"
cancel-in-progress: true

Expand All @@ -19,53 +19,54 @@ jobs:
packages: write

steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
- name: Validate Gradle Wrapper
uses: gradle/actions/setup-gradle@v3

- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'adopt'
cache: gradle

- name: Grant execution permission to Gradle Wrapper
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/wrapper-validation-action@v3

- name: Build Release APK
uses: gradle/gradle-build-action@v3
with:
arguments: assembleRelease

- name: Checks
run: find . -type f -name "*.apk"
- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'adopt'
cache: gradle

- uses: r0adkll/sign-android-release@v1
name: Sign app APK
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEY_BASE64 }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEYSTORE_PASS }}
keyPassword: ${{ secrets.KEYSTORE_PASS }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Grant execution permission to Gradle Wrapper
run: chmod +x gradlew

- uses: softprops/action-gh-release@v2
name: Create Release
id: publish_release
with:
files: ${{steps.sign_app.outputs.signedReleaseFile}}
draft: true
prerelease: false
- name: Build Release APK
run: ./gradlew assembleRelease

- uses: actions/upload-artifact@v4
with:
name: Signed APK
path: ${{steps.sign_app.outputs.signedReleaseFile}}
- name: Checks
run: find . -type f -name "*.apk"

- uses: r0adkll/sign-android-release@v1
name: Signing APK
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEY_BASE64 }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEYSTORE_PASS }}
keyPassword: ${{ secrets.KEYSTORE_PASS }}
env:
BUILD_TOOLS_VERSION: "34.0.0"

- uses: softprops/action-gh-release@v2
name: Create Release
id: publish_release
with:
files: ${{steps.sign_app.outputs.signedReleaseFile}}
draft: true
prerelease: false

- uses: actions/upload-artifact@v4
with:
name: Signed APK
path: ${{steps.sign_app.outputs.signedReleaseFile}}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class OfflineFirstRepoRepository @Inject constructor(
}
val updatedRepo = index.repo.toEntity(
id = repo.id,
fingerprint = repo.fingerprint.value,
// TODO: Not correct
fingerprint = repo.fingerprint!!.value,
username = repo.authentication.username,
password = repo.authentication.password,
etag = repo.versionInfo.etag ?: "",
Expand Down Expand Up @@ -98,7 +99,8 @@ class OfflineFirstRepoRepository @Inject constructor(
indices.forEach { (repo, index) ->
val updatedRepo = index!!.repo.toEntity(
id = repo.id,
fingerprint = repo.fingerprint.value,
// TODO: Not correct
fingerprint = repo.fingerprint!!.value,
username = repo.authentication.username,
password = repo.authentication.password,
etag = repo.versionInfo.etag ?: "",
Expand Down

0 comments on commit d769073

Please sign in to comment.