Merge pull request #3230 from kiwix/update-workflow-actions

Update GitHub workflow actions
This commit is contained in:
Kelson 2023-02-05 15:13:31 +01:00 committed by GitHub
commit 4607ad1f16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 26 deletions

View File

@ -23,13 +23,13 @@ jobs:
fetch-depth: 1 fetch-depth: 1
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v2 uses: actions/setup-java@v3
with: with:
distribution: temurin distribution: temurin
java-version: 11 java-version: 11
- name: Restore Cache - name: Restore Cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.gradle/caches ~/.gradle/caches
@ -71,7 +71,7 @@ jobs:
script: bash contrib/instrumentation.sh script: bash contrib/instrumentation.sh
- name: Upload screenshot result - name: Upload screenshot result
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
if: failure() if: failure()
with: with:
name: ${{ matrix.api-level }} name: ${{ matrix.api-level }}
@ -83,10 +83,10 @@ jobs:
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
if: ${{ matrix.api-level==21 }} if: ${{ matrix.api-level==21 }}
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3
- name: Upload Coverage to GH-Actions - name: Upload Coverage to GH-Actions
uses: actions/upload-artifact@v2.2.0 uses: actions/upload-artifact@v3
if: ${{ matrix.api-level==21 }} if: ${{ matrix.api-level==21 }}
with: with:
name: Tests Coverage Report name: Tests Coverage Report

View File

@ -12,11 +12,12 @@ jobs:
environment: nightly environment: nightly
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v2 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: temurin
- name: Build - name: Build
run: | run: |
# use timestamp as Version Code # use timestamp as Version Code

View File

@ -12,14 +12,15 @@ jobs:
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v1 uses: actions/checkout@v3
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: temurin
- name: build debug - name: build debug
run: ./gradlew assembleNightly run: ./gradlew assembleNightly

View File

@ -13,16 +13,17 @@ jobs:
continue-on-error: true continue-on-error: true
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v3
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: temurin
- name: Restore Cache - name: Restore Cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.gradle/caches ~/.gradle/caches
@ -36,7 +37,7 @@ jobs:
- name: Upload ktlint Reports - name: Upload ktlint Reports
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: ktlint-report name: ktlint-report
path: '**/build/reports/ktlint' path: '**/build/reports/ktlint'
@ -49,16 +50,18 @@ jobs:
continue-on-error: true continue-on-error: true
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v3
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: temurin
- name: Restore Cache - name: Restore Cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.gradle/caches ~/.gradle/caches
@ -70,7 +73,7 @@ jobs:
- name: Static Analysis - name: Static Analysis
run: ./gradlew detekt run: ./gradlew detekt
- name: Upload Lint Reports - name: Upload Lint Reports
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
if: ${{ always() }} if: ${{ always() }}
with: with:
name: detekt-report name: detekt-report
@ -85,17 +88,18 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: temurin
- name: Restore Cache - name: Restore Cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.gradle/caches ~/.gradle/caches
@ -107,7 +111,7 @@ jobs:
run: ./gradlew app:lintDebug custom:lintCustomexampleDebug run: ./gradlew app:lintDebug custom:lintCustomexampleDebug
- name: Upload Lint Reports - name: Upload Lint Reports
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
if: ${{ always() }} if: ${{ always() }}
with: with:
name: lint-report name: lint-report
@ -122,20 +126,21 @@ jobs:
continue-on-error: true continue-on-error: true
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v3
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: temurin
- name: Build all configurations - name: Build all configurations
run: ./gradlew assemble run: ./gradlew assemble
- name: Upload APK as Artifacts - name: Upload APK as Artifacts
uses: actions/upload-artifact@v2.2.0 uses: actions/upload-artifact@v3
if: ${{ always() }} if: ${{ always() }}
with: with:
name: kiwix-android name: kiwix-android

View File

@ -15,12 +15,13 @@ jobs:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v3
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v3
with: with:
java-version: 11 java-version: 11
distribution: temurin
- name: Decrypt files - name: Decrypt files
env: env: