Skip to content

Commit

Permalink
chore: bump ci to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
fankes committed Feb 21, 2025
1 parent 248daa5 commit cabf025
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/commit_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
See commit detail [here](${{ github.event.head_commit.url }})
COMMIT_URL: ${{ github.event.head_commit.url }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare GitHub Env
run: |
GITHUB_SHA=${{ github.sha }}
Expand All @@ -40,7 +40,7 @@ jobs:
with:
cmake-version: '3.22.1'
- name: Prepare Java 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-package: jdk
Expand Down Expand Up @@ -75,22 +75,22 @@ jobs:
echo "DEMO_DEBUG_APK_PATH=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
echo "DEMO_RELEASE_APK_PATH=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
- name: Upload Artifacts (Module-Debug)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ env.MODULE_DEBUG_APK_PATH }}
name: AppErrorsTracking-module-debug-${{ github.event.head_commit.id }}
- name: Upload Artifacts (Module-Release)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ env.MODULE_RELEASE_APK_PATH }}
name: AppErrorsTracking-module-release-${{ github.event.head_commit.id }}
- name: Upload Artifacts (Demo-Debug)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ env.DEMO_DEBUG_APK_PATH }}
name: AppErrorsTracking-demo-debug-${{ github.event.head_commit.id }}
- name: Upload Artifacts (Demo-Release)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ env.DEMO_RELEASE_APK_PATH }}
name: AppErrorsTracking-demo-release-${{ github.event.head_commit.id }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pull_request_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
MODULE_APK_OUTPUT_PATH: 'module-app/build/outputs/apk'
DEMO_APK_OUTPUT_PATH: 'demo-app/build/outputs/apk'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare GitHub Env
run: |
GITHUB_SHA=${{ github.sha }}
Expand All @@ -29,7 +29,7 @@ jobs:
with:
cmake-version: '3.22.1'
- name: Prepare Java 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
java-package: jdk
Expand Down Expand Up @@ -64,22 +64,22 @@ jobs:
echo "DEMO_DEBUG_APK_PATH=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
echo "DEMO_RELEASE_APK_PATH=$(find ${{ env.DEMO_APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
- name: Upload Artifacts (Module-Debug)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ env.MODULE_DEBUG_APK_PATH }}
name: AppErrorsTracking-module-debug-${{ github.event.head_commit.id }}
- name: Upload Artifacts (Module-Release)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ env.MODULE_RELEASE_APK_PATH }}
name: AppErrorsTracking-module-release-${{ github.event.head_commit.id }}
- name: Upload Artifacts (Demo-Debug)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ env.DEMO_DEBUG_APK_PATH }}
name: AppErrorsTracking-demo-debug-${{ github.event.head_commit.id }}
- name: Upload Artifacts (Demo-Release)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: ${{ env.DEMO_RELEASE_APK_PATH }}
name: AppErrorsTracking-demo-release-${{ github.event.head_commit.id }}
9 changes: 7 additions & 2 deletions demo-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@ androidComponents {
// Why? I don't know, but it works.
// Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
// public inline fun CharSequence.isNotBlank(): Boolean defined in kotlin.text.
@Suppress("UNNECESSARY_SAFE_CALL")
val currentSuffix = property.github.ci.commit.id?.let { suffix -> if (suffix.isNotBlank()) "-$suffix" else "" }
@Suppress("UNNECESSARY_SAFE_CALL", "RemoveRedundantCallsOfConversionMethods")
val currentSuffix = property.github.ci.commit.id?.let { suffix ->
// Workaround for GitHub Actions.
// Strongly transfer type to [String].
val sSuffix = suffix.toString()
if (sSuffix.isNotBlank()) "-$sSuffix" else ""
}
val currentVersion = "${output.versionName.get()}$currentSuffix(${output.versionCode.get()})"
if (output is com.android.build.api.variant.impl.VariantOutputImpl)
output.outputFileName.set("${property.project.name}-demo-v$currentVersion-$currentType.apk")
Expand Down
9 changes: 7 additions & 2 deletions module-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ androidComponents {
// Why? I don't know, but it works.
// Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
// public inline fun CharSequence.isNotBlank(): Boolean defined in kotlin.text.
@Suppress("UNNECESSARY_SAFE_CALL")
val currentSuffix = property.github.ci.commit.id?.let { suffix -> if (suffix.isNotBlank()) "-$suffix" else "" }
@Suppress("UNNECESSARY_SAFE_CALL", "RemoveRedundantCallsOfConversionMethods")
val currentSuffix = property.github.ci.commit.id?.let { suffix ->
// Workaround for GitHub Actions.
// Strongly transfer type to [String].
val sSuffix = suffix.toString()
if (sSuffix.isNotBlank()) "-$sSuffix" else ""
}
val currentVersion = "${output.versionName.get()}$currentSuffix(${output.versionCode.get()})"
if (output is com.android.build.api.variant.impl.VariantOutputImpl)
output.outputFileName.set("${property.project.name}-module-v$currentVersion-$currentType.apk")
Expand Down

0 comments on commit cabf025

Please sign in to comment.