Update dependency me.saket.cascade:cascade to v2.2.0 (#450) #1478
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
paths-ignore: | |
- '.idea/**' | |
- '.gitattributes' | |
- '.github/**.json' | |
- '.gitignore' | |
- '.gitmodules' | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
- '.github/workflows/tasks.yml' | |
- '.github/workflows/code_quality.yml' | |
- '.github/workflows/nightly-merge.yml' | |
- 'source/**' | |
- 'qodana.yaml' | |
pull_request: | |
paths-ignore: | |
- '.idea/**' | |
- '.gitattributes' | |
- '.github/**.json' | |
- '.gitignore' | |
- '.gitmodules' | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
- '.github/workflows/tasks.yml' | |
- '.github/workflows/code_quality.yml' | |
- '.github/workflows/nightly-merge.yml' | |
- 'source/**' | |
- 'qodana.yaml' | |
env: | |
BUGLY_APPID: ${{ secrets.BUGLY_APPID }} | |
jobs: | |
validate-gradle-wrapper: | |
name: Validate_Gradle_Wrapper | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Skip duplicate actions | |
uses: fkirc/skip-duplicate-actions@v5.3.0 | |
with: | |
cancel_others: true | |
- name: Set up java | |
uses: actions/setup-java@v3.11.0 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1.0.6 | |
check: | |
name: Check | |
needs: validate-gradle-wrapper | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Set up java | |
uses: actions/setup-java@v3.11.0 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v2.4.2 | |
- name: Check (debug) | |
run: ./gradlew lintAnalyzeDebug --warning-mode all --scan | |
- name: Check (release) | |
run: ./gradlew lintAnalyzeRelease --warning-mode all --scan | |
build_debug: | |
name: Build_Debug | |
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/') }} | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Set up java | |
uses: actions/setup-java@v3.11.0 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v2.4.2 | |
- run: ./gradlew assembleDebug --scan | |
- name: Sign apk release | |
id: signStep | |
uses: ilharp/sign-android-release@nightly | |
with: | |
releaseDir: app/build/outputs/apk/debug | |
signingKey: ${{ secrets.SIGNING_KEY }} | |
keyAlias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_PASS }} | |
keyPassword: ${{ secrets.KEY_PASS }} | |
buildToolsVersion: 33.0.0 | |
- name: Upload signed apk | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: signed_debug_apk | |
path: ${{ steps.signStep.outputs.signedFile }} | |
test_debug: | |
name: Test_Debug | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Set up java | |
uses: actions/setup-java@v3.11.0 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v2.4.2 | |
- run: ./gradlew testDebugUnitTest --warning-mode all | |
build_release: | |
name: Build_Release | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Set up java | |
uses: actions/setup-java@v3.11.0 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v2.4.2 | |
- run: ./gradlew assembleRelease --scan | |
- name: Upload mapping to Bugly | |
uses: qhy040404/Bugly-mapping-upload@v1.0.1 | |
with: | |
appid: ${{ secrets.BUGLY_APPID }} | |
appkey: ${{ secrets.BUGLY_APPKEY }} | |
bundleid: 'com.qhy040404.libraryonetap' | |
version: ${{ github.ref_name }} | |
platform: 'Android' | |
inputMapping: 'app/build/outputs/mapping/release' | |
- name: Rename unsigned apk | |
run: | | |
sudo apt-get install rename -y | |
rename 's/-unsigned.apk/.apk/' app/build/outputs/apk/release/* | |
- name: Sign apk release | |
id: signStep | |
uses: ilharp/sign-android-release@nightly | |
with: | |
releaseDir: app/build/outputs/apk/release | |
signingKey: ${{ secrets.SIGNING_KEY }} | |
keyAlias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_PASS }} | |
keyPassword: ${{ secrets.KEY_PASS }} | |
buildToolsVersion: 33.0.0 | |
- name: Upload signed apk | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: signed_release_apk | |
path: ${{ steps.signStep.outputs.signedFile }} | |
test_release: | |
name: Test_Release | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Set up java | |
uses: actions/setup-java@v3.11.0 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v2.4.2 | |
- run: ./gradlew testReleaseUnitTest --warning-mode all | |
pre-release: | |
name: Pre-release | |
if: ${{ contains(github.ref, 'Pre') }} | |
needs: [ build_release, test_release ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Download signed release apk | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: signed_release_apk | |
path: upload | |
- name: Rename pre-release apk | |
run: | | |
sudo apt-get install rename -y | |
rename 's/-release-signed.apk/-Pre-release-signed.apk/' upload/* | |
- name: Generate SHA-512 checksums | |
shell: sh | |
run: | | |
set -eu | |
( | |
cd "upload" | |
sha512sum *.apk > SHA512SUMS | |
) | |
- name: Upload SHA512SUMS | |
continue-on-error: true | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: SHA512SUMS | |
path: upload/SHA512SUMS | |
- name: Generate release body | |
continue-on-error: true | |
uses: qhy040404/auto-generate-release-body@v1.1.3 | |
with: | |
changelog: 'Changelog.md' | |
template: '.github/RELEASE_TEMPLATE.md' | |
tag: ${{ github.ref_name }} | |
template-data: '* This is automated GitHub deployment, human-readable changelog should be available soon.' | |
fore-delimiter: ${{ github.ref_name }} | |
back-delimiter: '---' | |
- name: Create GitHub release | |
id: github_release | |
uses: actions/create-release@v1.1.4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.QHYBOT_RELEASE_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: v${{ github.ref }} | |
body_path: .github/RELEASE_TEMPLATE.md | |
prerelease: true | |
- name: Upload apk to Github release | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.QHYBOT_RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.github_release.outputs.upload_url }} | |
asset_path: upload/Library-One-Tap_v${{ github.ref_name }}-release-signed.apk | |
asset_name: Library-One-Tap_v${{ github.ref_name }}-release-signed.apk | |
asset_content_type: application/vnd.android.package-archive | |
- name: Upload SHA512SUMS to GitHub release | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.QHYBOT_RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.github_release.outputs.upload_url }} | |
asset_path: upload/SHA512SUMS | |
asset_name: SHA512SUMS | |
asset_content_type: text/plain | |
release: | |
name: Release | |
if: ${{ !contains(github.ref, 'Pre') }} | |
needs: [ build_release, test_release ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.5.3 | |
with: | |
fetch-depth: 0 | |
- name: Download signed release apk | |
uses: actions/download-artifact@v3.0.2 | |
with: | |
name: signed_release_apk | |
path: upload | |
- name: Generate SHA-512 checksums | |
shell: sh | |
run: | | |
set -eu | |
( | |
cd "upload" | |
sha512sum *.apk > SHA512SUMS | |
) | |
- name: Upload SHA512SUMS | |
continue-on-error: true | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: SHA512SUMS | |
path: upload/SHA512SUMS | |
- name: Generate release body | |
continue-on-error: true | |
uses: qhy040404/auto-generate-release-body@v1.1.3 | |
with: | |
changelog: 'Changelog.md' | |
template: '.github/RELEASE_TEMPLATE.md' | |
tag: ${{ github.ref_name }} | |
template-data: '* This is automated GitHub deployment, human-readable changelog should be available soon.' | |
fore-delimiter: ${{ github.ref_name }} | |
back-delimiter: '---' | |
- name: Create Github release | |
id: github_release | |
uses: actions/create-release@v1.1.4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.QHYBOT_RELEASE_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: v${{ github.ref }} | |
body_path: .github/RELEASE_TEMPLATE.md | |
prerelease: false | |
- name: Upload apk to Github release | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.QHYBOT_RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.github_release.outputs.upload_url }} | |
asset_path: upload/Library-One-Tap_v${{ github.ref_name }}-release-signed.apk | |
asset_name: Library-One-Tap_v${{ github.ref_name }}-release-signed.apk | |
asset_content_type: application/vnd.android.package-archive | |
- name: Upload SHA512SUMS to GitHub release | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.QHYBOT_RELEASE_TOKEN }} | |
with: | |
upload_url: ${{ steps.github_release.outputs.upload_url }} | |
asset_path: upload/SHA512SUMS | |
asset_name: SHA512SUMS | |
asset_content_type: text/plain |