name: Build debug APK on: workflow_dispatch: push: branches: - '*' - '*/*' - '**' - '!12.1-dev-localization' - '!12.1-alpha' jobs: build-debug-apk: runs-on: ubuntu-latest continue-on-error: true steps: - name: Check out repository uses: actions/checkout@v3 with: submodules: true - name: Set up Java 11 uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: 11 - uses: gradle/gradle-build-action@v2 - name: Grant execution permission to Gradle Wrapper run: chmod +x gradlew - name: Build debug APK run: ./gradlew assembleLawnWithQuickstepDebug - name: Sign debug APK uses: r0adkll/sign-android-release@v1 id: sign-debug-apk with: releaseDirectory: build/outputs/apk/lawnWithQuickstep/debug signingKeyBase64: ${{ secrets.KEYSTORE }} alias: ${{ secrets.KEY_ALIAS }} keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} - name: Rename artifact run: | oldArtifactPath="${{ steps.sign-debug-apk.outputs.signedReleaseFile }}" newArtifactPath="${oldArtifactPath%'-signed.apk'}.apk" echo "ARTIFACT_PATH=$newArtifactPath" >> $GITHUB_ENV mv "$oldArtifactPath" "$newArtifactPath" - name: Upload artifact uses: actions/upload-artifact@v3 with: name: Debug APK path: ${{ env.ARTIFACT_PATH }} send-notifications: runs-on: ubuntu-latest needs: build-debug-apk steps: - name: Check out repository uses: actions/checkout@v3 with: submodules: true fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v3 with: python-version: '3.x' - name: Install Python packages run: | python -m pip install --upgrade pip pip install gitpython requests - name: Download artifact uses: actions/download-artifact@v3 with: name: Debug APK path: artifacts/debug-apk - name: Send notifications run: python ci.py env: GITHUB_EVENT_BEFORE: ${{ github.event.before }} TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_CI_BOT_TOKEN }} TELEGRAM_CI_CHANNEL_ID: ${{ secrets.TELEGRAM_CI_CHANNEL_ID }} TELEGRAM_TEAM_GROUP_ID: ${{ secrets.NOTIFY_CHANNEL_ID }} ARTIFACT_DIRECTORY: artifacts/debug-apk GITHUB_REF: ${{ github.ref }} ACTION: internal_notifications