<commit_before># This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build and Deploy

on:
  push:
    branches: [ stable-7 ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: recursive
      - uses: actions/cache@v2
        with:
          path: |
            ~/.gradle/caches
            ${{ github.workspace }}/.gradle/minecraft
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
          restore-keys: |
            ${{ runner.os }}-gradle-
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Grant execute permission for gradlew
        run: chmod +x gradlew
      - name: run number with offset
        run: echo "BUILD_NUMBER=$(($GITHUB_RUN_NUMBER+391))" >> $GITHUB_ENV
      - name: Setup workspace
        run : |
          echo "GIT_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
          echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
          ./gradlew --refresh-dependencies setupDecompWorkspace
      - name: Build with Gradle
        run: |
          ./gradlew --refresh-dependencies -s clean build
        env:
          CI_SYSTEM: Github Actions
      - name: Add artifacts to build
        uses: actions/upload-artifact@v2
        with:
          name: Sponge Jars
          path: |
            ${{ github.workspace }}/SpongeCommon/SpongeAPI/build/libs/*.jar
            ${{ github.workspace }}/SpongeCommon/build/libs/*.jar
            ${{ github.workspace }}/build/libs/*.jar
      - name: Production Ready Jar
        uses: actions/upload-artifact@v2
        with:
          name: Sponge Production Jar
          path: ${{ github.workspace }}/build/libs/*RC${{ env.BUILD_NUMBER }}.jar
      # The USERNAME and TOKEN need to correspond to the credentials environment variables used in
      # the publishing section of your build.gradle
      - name: Publish to Sponge Maven & GitHub Packages
        run: ./gradlew :uploadArchives
        env:
          GITHUB_USERNAME: ${{ github.actor }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}<commit_msg>Clean and rebuild before upload to try to ensure the refmap is included.<commit_after># This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build and Deploy

on:
  push:
    branches: [ stable-7 ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: recursive
      - uses: actions/cache@v2
        with:
          path: |
            ~/.gradle/caches
            ${{ github.workspace }}/.gradle/minecraft
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
          restore-keys: |
            ${{ runner.os }}-gradle-
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Grant execute permission for gradlew
        run: chmod +x gradlew
      - name: run number with offset
        run: echo "BUILD_NUMBER=$(($GITHUB_RUN_NUMBER+391))" >> $GITHUB_ENV
      - name: Setup workspace
        run : |
          echo "GIT_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
          echo "GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
          ./gradlew --refresh-dependencies setupDecompWorkspace
      - name: Build with Gradle
        run: |
          ./gradlew --refresh-dependencies -s clean build
        env:
          CI_SYSTEM: Github Actions
      - name: Add artifacts to build
        uses: actions/upload-artifact@v2
        with:
          name: Sponge Jars
          path: |
            ${{ github.workspace }}/SpongeCommon/SpongeAPI/build/libs/*.jar
            ${{ github.workspace }}/SpongeCommon/build/libs/*.jar
            ${{ github.workspace }}/build/libs/*.jar
      - name: Production Ready Jar
        uses: actions/upload-artifact@v2
        with:
          name: Sponge Production Jar
          path: ${{ github.workspace }}/build/libs/*RC${{ env.BUILD_NUMBER }}.jar
      # The USERNAME and TOKEN need to correspond to the credentials environment variables used in
      # the publishing section of your build.gradle
      - name: Publish to Sponge Maven & GitHub Packages
        run: ./gradlew clean build :uploadArchives
        env:
          GITHUB_USERNAME: ${{ github.actor }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
{'fraction_non_alphanumeric': 0.11597658790375028, 'fraction_numerical': 0.0056362453934532845, 'mean_word_length': 2.0556291390728476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5975152', 'n_tokens_mistral': 1453, 'n_tokens_neox': 1357, 'n_words': 358}