update extractor #181
This file contains hidden or 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: CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'README.md' | |
| - 'fastlane/**' | |
| - 'assets/**' | |
| - '.github/**' | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'README.md' | |
| - 'fastlane/**' | |
| - 'assets/**' | |
| - '.github/**' | |
| jobs: | |
| build-client: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| files: ${{ steps.step-output.outputs.files }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - uses: gradle/wrapper-validation-action@v1 | |
| - name: Create and checkout branch | |
| # push events already checked out the branch | |
| if: github.event_name == 'pull_request' | |
| env: | |
| BRANCH: ${{ github.head_ref }} | |
| run: git checkout -B "$BRANCH" | |
| - name: Set up JDK 24 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 24 | |
| distribution: "temurin" | |
| cache: 'gradle' | |
| - name: Build Nightly APK | |
| env: | |
| NIGHTLY_KEYSTORE_FILE: ../../nightly.jks | |
| NIGHTLY_KEYSTORE_PASSWORD: ${{ secrets.NIGHTLY_KEYSTORE_PASSWORD }} | |
| NIGHTLY_KEY_ALIAS: ${{ secrets.NIGHTLY_KEY_ALIAS }} | |
| NIGHTLY_KEY_PASSWORD: ${{ secrets.NIGHTLY_KEY_PASSWORD }} | |
| run: | | |
| if [ -n "${{ secrets.NIGHTLY_KEYSTORE_BASE64 }}" ]; then | |
| echo "${{ secrets.NIGHTLY_KEYSTORE_BASE64 }}" | base64 -d > nightly.jks | |
| fi | |
| cd client/android | |
| ./gradlew assembleNightly --stacktrace -DskipFormatKtlint | |
| - name: Upload APKs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: all-apks-in-one(intermediates) | |
| retention-days: 1 | |
| path: client/android/build/outputs/apk/nightly/*.apk | |
| - name: Output filenames | |
| id: step-output | |
| run: | | |
| files=$(ls client/android/build/outputs/apk/nightly) | |
| json_array="[" | |
| first_file=true | |
| for file in $files; do | |
| if [ "$first_file" = false ]; then | |
| json_array+=", \"$file\"" | |
| else | |
| json_array+="\"$file\"" | |
| first_file=false | |
| fi | |
| done | |
| json_array+="]" | |
| echo "files=$json_array" | |
| echo "files=$json_array" >> "$GITHUB_OUTPUT" | |
| upload-apk: | |
| runs-on: ubuntu-latest | |
| needs: build-client | |
| strategy: | |
| matrix: | |
| file: ${{ fromJson(needs.build-client.outputs.files) }} | |
| steps: | |
| - name: Download APKs | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: all-apks-in-one(intermediates) | |
| path: apks | |
| merge-multiple: true | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.file }} | |
| path: apks/${{ matrix.file }} |