name: Build Revanced APK env: DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 HAVE_TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID != '' }} on: workflow_dispatch: inputs: SKIP_GITHUB_UPLOAD: description: 'Should upload to GitHub' required: false type: boolean default: true concurrency: group: ${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: build-apk: name: APK Build runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Check out Git repository uses: actions/checkout@v3 - name: Update Env for custom build run: | echo "${{ secrets.ENVS }}" >> .env - name: Build Revanced APKs run: | docker-compose up - name: Upload Build APKS uses: actions/upload-artifact@v3 with: name: Built-APKs path: | apks/*-output.apk apks/VancedMicroG.apk" if-no-files-found: error upload-to-github: name: GitHub Upload runs-on: ubuntu-latest timeout-minutes: 5 needs: build-apk if: ${{ inputs.SKIP_GITHUB_UPLOAD }} steps: - name: Download Already Built APKs uses: actions/download-artifact@v3 with: name: Built-APKs - name: Get Date id: get-date run: | echo ::set-output name=date::$(TZ='Asia/Kolkata' date +"%Y.%m.%d-%H.%M.%S") - name: Delete Older Releases uses: nikhilbadyal/ghaction-rm-releases@v0.0.2 with: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} RELEASE_PATTERN: 'Build*' - name: Upload Build Artifact uses: ncipollo/release-action@v1.11.1 with: artifacts: "*-output.apk" token: ${{ secrets.GH_TOKEN }} tag: Build-${{ steps.get-date.outputs.date }} artifactErrorsFailBuild: true generateReleaseNotes: true - name: Sleep for 10 seconds run: | sleep 10 upload-to-telegram: name: Telegram Upload runs-on: ubuntu-latest timeout-minutes: 5 needs: [ build-apk,upload-to-github ] steps: - name: Upload to Telegram uses: nikhilbadyal/ghaction-telegram-uploader@main if: ${{ env.HAVE_TELEGRAM_API_ID == 'true' }} with: API_ID: ${{ secrets.TELEGRAM_API_ID }} API_HASH: ${{ secrets.TELEGRAM_API_HASH }} BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} STICKER_ID: ${{ secrets.STICKER_ID }}