ci: Address deprecation in setup-gradle action (#853)

* ci: Address deprecation in setup-gradle action

* consistency
This commit is contained in:
beerpsi 2024-01-31 19:57:01 +07:00 committed by GitHub
parent 20d75109a0
commit 1a7126b68e
2 changed files with 31 additions and 28 deletions

View File

@ -64,11 +64,12 @@ jobs:
echo "isIndividualChanged=$isIndividualChanged" >> $GITHUB_OUTPUT
echo "isMultisrcChanged=$isMultisrcChanged" >> $GITHUB_OUTPUT
- name: Set up Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3
- name: Generate multisrc sources
if: ${{ steps.parse-changed-files.outputs.isMultisrcChanged == '1' }}
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0-rc.1
with:
arguments: :multisrc:generateExtensions
run: ./gradlew :multisrc:generateExtensions
- name: Get number of modules
run: |
@ -113,22 +114,21 @@ jobs:
java-version: 17
distribution: temurin
- name: Generate sources from the multi-source library
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0-rc.1
env:
CI_MODULE_GEN: "true"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3
with:
arguments: :multisrc:generateExtensions
cache-read-only: true
- name: Generate sources from the multi-source library
env:
CI_MODULE_GEN: "true"
run: ./gradlew :multisrc:generateExtensions
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0-rc.1
env:
CI_MULTISRC: "true"
CI_CHUNK_NUM: ${{ matrix.chunk }}
with:
arguments: assembleDebug
cache-read-only: true
run: ./gradlew assembleDebug
build_individual:
name: Build individual modules
@ -147,11 +147,13 @@ jobs:
java-version: 17
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3
with:
cache-read-only: true
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0-rc.1
env:
CI_MULTISRC: "false"
CI_CHUNK_NUM: ${{ matrix.chunk }}
with:
arguments: assembleDebug
cache-read-only: true
run: ./gradlew assembleDebug

View File

@ -37,10 +37,11 @@ jobs:
java-version: 17
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3
- name: Generate multisrc sources
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0-rc.1
with:
arguments: :multisrc:generateExtensions
run: ./gradlew :multisrc:generateExtensions
- name: Get number of modules
run: |
@ -88,23 +89,22 @@ jobs:
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
- name: Set up Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3
- name: Generate sources from the multi-source library
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0-rc.1
env:
CI_MODULE_GEN: "true"
with:
arguments: :multisrc:generateExtensions
run: ./gradlew :multisrc:generateExtensions
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0-rc.1
env:
CI_MULTISRC: "true"
CI_CHUNK_NUM: ${{ matrix.chunk }}
ALIAS: ${{ secrets.ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
with:
arguments: assembleRelease
run: ./gradlew assembleRelease
- name: Upload APKs (chunk ${{ matrix.chunk }})
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4
@ -137,16 +137,17 @@ jobs:
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 -d > signingkey.jks
- name: Set up Gradle
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3
- name: Build extensions (chunk ${{ matrix.chunk }})
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0-rc.1
env:
CI_MULTISRC: "false"
CI_CHUNK_NUM: ${{ matrix.chunk }}
ALIAS: ${{ secrets.ALIAS }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
with:
arguments: assembleRelease
run: ./gradlew assembleRelease
- name: Upload APKs (chunk ${{ matrix.chunk }})
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4