mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-04 01:35:22 +08:00
chore: bump ci to v4
This commit is contained in:
8
.github/workflows/commit_ci.yml
vendored
8
.github/workflows/commit_ci.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
See commit detail [here](${{ github.event.head_commit.url }})
|
See commit detail [here](${{ github.event.head_commit.url }})
|
||||||
COMMIT_URL: ${{ github.event.head_commit.url }}
|
COMMIT_URL: ${{ github.event.head_commit.url }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Prepare GitHub Env
|
- name: Prepare GitHub Env
|
||||||
run: |
|
run: |
|
||||||
GITHUB_SHA=${{ github.sha }}
|
GITHUB_SHA=${{ github.sha }}
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cmake-version: '3.22.1'
|
cmake-version: '3.22.1'
|
||||||
- name: Prepare Java 17
|
- name: Prepare Java 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: 17
|
java-version: 17
|
||||||
java-package: jdk
|
java-package: jdk
|
||||||
@@ -69,12 +69,12 @@ jobs:
|
|||||||
echo "DEBUG_APK_PATH=$(find ${{ env.APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
|
echo "DEBUG_APK_PATH=$(find ${{ env.APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
|
||||||
echo "RELEASE_APK_PATH=$(find ${{ env.APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
|
echo "RELEASE_APK_PATH=$(find ${{ env.APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
|
||||||
- name: Upload Artifacts (Debug)
|
- name: Upload Artifacts (Debug)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.DEBUG_APK_PATH }}
|
path: ${{ env.DEBUG_APK_PATH }}
|
||||||
name: ColorOSNotifyIcon-debug-${{ github.event.head_commit.id }}
|
name: ColorOSNotifyIcon-debug-${{ github.event.head_commit.id }}
|
||||||
- name: Upload Artifacts (Release)
|
- name: Upload Artifacts (Release)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.RELEASE_APK_PATH }}
|
path: ${{ env.RELEASE_APK_PATH }}
|
||||||
name: ColorOSNotifyIcon-release-${{ github.event.head_commit.id }}
|
name: ColorOSNotifyIcon-release-${{ github.event.head_commit.id }}
|
||||||
|
8
.github/workflows/pull_request_ci.yml
vendored
8
.github/workflows/pull_request_ci.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
APK_OUTPUT_PATH: 'app/build/outputs/apk'
|
APK_OUTPUT_PATH: 'app/build/outputs/apk'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Prepare GitHub Env
|
- name: Prepare GitHub Env
|
||||||
run: |
|
run: |
|
||||||
GITHUB_SHA=${{ github.sha }}
|
GITHUB_SHA=${{ github.sha }}
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cmake-version: '3.22.1'
|
cmake-version: '3.22.1'
|
||||||
- name: Prepare Java 17
|
- name: Prepare Java 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: 17
|
java-version: 17
|
||||||
java-package: jdk
|
java-package: jdk
|
||||||
@@ -59,12 +59,12 @@ jobs:
|
|||||||
echo "DEBUG_APK_PATH=$(find ${{ env.APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
|
echo "DEBUG_APK_PATH=$(find ${{ env.APK_OUTPUT_PATH }}/debug -name '*.apk')" >> $GITHUB_ENV
|
||||||
echo "RELEASE_APK_PATH=$(find ${{ env.APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
|
echo "RELEASE_APK_PATH=$(find ${{ env.APK_OUTPUT_PATH }}/release -name '*.apk')" >> $GITHUB_ENV
|
||||||
- name: Upload Artifacts (Debug)
|
- name: Upload Artifacts (Debug)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.DEBUG_APK_PATH }}
|
path: ${{ env.DEBUG_APK_PATH }}
|
||||||
name: ColorOSNotifyIcon-debug-${{ github.event.head_commit.id }}
|
name: ColorOSNotifyIcon-debug-${{ github.event.head_commit.id }}
|
||||||
- name: Upload Artifacts (Release)
|
- name: Upload Artifacts (Release)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.RELEASE_APK_PATH }}
|
path: ${{ env.RELEASE_APK_PATH }}
|
||||||
name: ColorOSNotifyIcon-release-${{ github.event.head_commit.id }}
|
name: ColorOSNotifyIcon-release-${{ github.event.head_commit.id }}
|
@@ -63,8 +63,13 @@ androidComponents {
|
|||||||
// Why? I don't know, but it works.
|
// Why? I don't know, but it works.
|
||||||
// Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
|
// Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
|
||||||
// public inline fun CharSequence.isNotBlank(): Boolean defined in kotlin.text.
|
// public inline fun CharSequence.isNotBlank(): Boolean defined in kotlin.text.
|
||||||
@Suppress("UNNECESSARY_SAFE_CALL")
|
@Suppress("UNNECESSARY_SAFE_CALL", "RemoveRedundantCallsOfConversionMethods")
|
||||||
val currentSuffix = property.github.ci.commit.id?.let { suffix -> if (suffix.isNotBlank()) "-$suffix" else "" }
|
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()})"
|
val currentVersion = "${output.versionName.get()}$currentSuffix(${output.versionCode.get()})"
|
||||||
if (output is com.android.build.api.variant.impl.VariantOutputImpl)
|
if (output is com.android.build.api.variant.impl.VariantOutputImpl)
|
||||||
output.outputFileName.set("${property.project.name}-v$currentVersion-$currentType.apk")
|
output.outputFileName.set("${property.project.name}-v$currentVersion-$currentType.apk")
|
||||||
|
Reference in New Issue
Block a user