<commit_before>name: CI

on:
  push:
    branches:
      - master

jobs:
  check_wrapper:
    name: Validate Gradle Wrapper
    runs-on: ubuntu-latest
    steps:
      - name: Clone repo
        uses: actions/checkout@v2

      - name: Validate Gradle Wrapper
        uses: gradle/wrapper-validation-action@v1

  build_multisrc:
    name: Build multisrc modules
    needs: check_wrapper
    if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')"
    runs-on: ubuntu-latest
    strategy:
      matrix:
        lang: [all, en, ar, ca, de, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh, bg, hi, pl]
    steps:
      - name: Checkout master branch
        uses: actions/checkout@v2

      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Copy CI gradle.properties
        run: |
          mkdir -p ~/.gradle
          cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties

      - name: Generate sources from the multi-source library
        uses: eskatos/gradle-command-action@v1
        env:
          CI_MULTISRC: "true"
        with:
          arguments: :multisrc:generateExtensions
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true

      - name: Build "${{ matrix.lang }}" extensions
        uses: eskatos/gradle-command-action@v1
        env:
          CI_MULTISRC: "true"
          CI_MATRIX_LANG: ${{ matrix.lang }}
        with:
          arguments: assembleRelease
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true

      - name: Upload "${{ matrix.lang }}" APKs
        uses: actions/upload-artifact@v2
        with:
          name: "multisrc-${{ matrix.lang }}-apks"
          path: "**/*.apk"
          retention-days: 1

  build_individual:
    name: Build individual modules
    needs: check_wrapper
    if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')"
    runs-on: ubuntu-latest
    strategy:
      matrix:
        lang: [all, en, ar, ca, de, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh, bg, hi, pl]
    steps:
      - name: Checkout master branch
        uses: actions/checkout@v2

      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Copy CI gradle.properties
        run: |
          mkdir -p ~/.gradle
          cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties

      - name: Build "${{ matrix.lang }}" extensions
        uses: eskatos/gradle-command-action@v1
        env:
          CI_MULTISRC: "false"
          CI_MATRIX_LANG: ${{ matrix.lang }}
        with:
          arguments: assembleRelease
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true

      - name: Upload "${{ matrix.lang }}" APKs
        uses: actions/upload-artifact@v2
        with:
          name: "individual-${{ matrix.lang }}-apks"
          path: "**/*.apk"
          retention-days: 1

  publish_repo:
    name: Publish repo
    needs:
      - build_multisrc
      - build_individual
    if: "github.repository == 'tachiyomiorg/tachiyomi-extensions'"
    runs-on: ubuntu-latest
    steps:
      - name: Download APK artifacts
        uses: actions/download-artifact@v2
        with:
          path: ~/apk-artifacts

      - name: Checkout master branch
        uses: actions/checkout@v2
        with:
          ref: master
          path: master

      - name: Sign APKs
        run: |
          cd master
          ./.github/scripts/sign-apks.sh \
            ${{ secrets.SIGNING_KEY }} \
            ${{ secrets.ALIAS }} \
            ${{ secrets.KEY_STORE_PASSWORD }} \
            ${{ secrets.KEY_PASSWORD }}

      - name: Create repo artifacts
        run: |
          cd master
          ./.github/scripts/create-repo.sh

      - name: Checkout repo branch
        uses: actions/checkout@v2
        with:
          ref: repo
          path: repo

      - name: Deploy repo
        run: |
          cd repo
          ../master/.github/scripts/commit-repo.sh
<commit_msg>Add back step to cancel previous push builds<commit_after>name: CI

on:
  push:
    branches:
      - master

jobs:
  check_wrapper:
    name: Validate Gradle Wrapper
    runs-on: ubuntu-latest
    steps:
      - name: Clone repo
        uses: actions/checkout@v2

      - name: Validate Gradle Wrapper
        uses: gradle/wrapper-validation-action@v1

      - name: Cancel previous runs
        uses: styfle/cancel-workflow-action@0.8.0
        with:
          access_token: ${{ github.token }}

  build_multisrc:
    name: Build multisrc modules
    needs: check_wrapper
    if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')"
    runs-on: ubuntu-latest
    strategy:
      matrix:
        lang: [all, en, ar, ca, de, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh, bg, hi, pl]
    steps:
      - name: Checkout master branch
        uses: actions/checkout@v2

      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Copy CI gradle.properties
        run: |
          mkdir -p ~/.gradle
          cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties

      - name: Generate sources from the multi-source library
        uses: eskatos/gradle-command-action@v1
        env:
          CI_MULTISRC: "true"
        with:
          arguments: :multisrc:generateExtensions
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true

      - name: Build "${{ matrix.lang }}" extensions
        uses: eskatos/gradle-command-action@v1
        env:
          CI_MULTISRC: "true"
          CI_MATRIX_LANG: ${{ matrix.lang }}
        with:
          arguments: assembleRelease
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true

      - name: Upload "${{ matrix.lang }}" APKs
        uses: actions/upload-artifact@v2
        with:
          name: "multisrc-${{ matrix.lang }}-apks"
          path: "**/*.apk"
          retention-days: 1

  build_individual:
    name: Build individual modules
    needs: check_wrapper
    if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')"
    runs-on: ubuntu-latest
    strategy:
      matrix:
        lang: [all, en, ar, ca, de, es, fr, id, it, ja, ko, pt, ru, th, tr, vi, zh, bg, hi, pl]
    steps:
      - name: Checkout master branch
        uses: actions/checkout@v2

      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Copy CI gradle.properties
        run: |
          mkdir -p ~/.gradle
          cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties

      - name: Build "${{ matrix.lang }}" extensions
        uses: eskatos/gradle-command-action@v1
        env:
          CI_MULTISRC: "false"
          CI_MATRIX_LANG: ${{ matrix.lang }}
        with:
          arguments: assembleRelease
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true

      - name: Upload "${{ matrix.lang }}" APKs
        uses: actions/upload-artifact@v2
        with:
          name: "individual-${{ matrix.lang }}-apks"
          path: "**/*.apk"
          retention-days: 1

  publish_repo:
    name: Publish repo
    needs:
      - build_multisrc
      - build_individual
    if: "github.repository == 'tachiyomiorg/tachiyomi-extensions'"
    runs-on: ubuntu-latest
    steps:
      - name: Download APK artifacts
        uses: actions/download-artifact@v2
        with:
          path: ~/apk-artifacts

      - name: Checkout master branch
        uses: actions/checkout@v2
        with:
          ref: master
          path: master

      - name: Sign APKs
        run: |
          cd master
          ./.github/scripts/sign-apks.sh \
            ${{ secrets.SIGNING_KEY }} \
            ${{ secrets.ALIAS }} \
            ${{ secrets.KEY_STORE_PASSWORD }} \
            ${{ secrets.KEY_PASSWORD }}

      - name: Create repo artifacts
        run: |
          cd master
          ./.github/scripts/create-repo.sh

      - name: Checkout repo branch
        uses: actions/checkout@v2
        with:
          ref: repo
          path: repo

      - name: Deploy repo
        run: |
          cd repo
          ../master/.github/scripts/commit-repo.sh

{'fraction_non_alphanumeric': 0.11098144474267709, 'fraction_numerical': 0.005018088458396546, 'mean_word_length': 1.780661907852044, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5914769', 'n_tokens_mistral': 2739, 'n_tokens_neox': 2596, 'n_words': 642}