<commit_before>name: Publish Plugin
on:
  push:
    tags:
      - '[0-9].[0-9].[0-9]-[0-9][0-9][0-9][0-9].[1-3]'

jobs:
  publish:
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: 11
      - uses: actions/cache@v2
        with:
          path: |
            ~/.gradle/caches
            ~/.gradle/jdks
            ~/.gradle/native
            ~/.gradle/wrapper
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('gradle.properties') }}
          restore-keys: |
            ${{ runner.os }}-gradle-
      - uses: gradle/wrapper-validation-action@v1
      - name: Setup publish token
        env:
          JETBRAINS_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
        shell: bash
        run: |
          mkdir -p ~/.gradle/
          echo "GRADLE_USER_HOME=$HOME/.gradle" >> "$GITHUB_ENV"
          echo "mcdev.deploy.token=${JETBRAINS_TOKEN}" > ~/.gradle/gradle.properties
          echo "mcdev.deploy.channel=testing" >> ~/.gradle/gradle.properties
      - name: Publish plugin
        run: ./gradlew clean publishPlugin --no-daemon --stacktrace
      - name: Get tag name
        id: get_tag
        run: echo ::set-output name=tag::$(echo $GITHUB_REF | cut -d / -f 3)
      - name: Create GitHub Release
        uses: softprops/action-gh-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ steps.get_tag.outputs.tag }}
          name: 'Release ${{ steps.get_tag.outputs.tag }}'
          body: '[View all plugin releases here.](https://plugins.jetbrains.com/plugin/8327-minecraft-development/versions/stable/)'
          prerelease: false
          draft: false
          files: build/distributions/*.zip<commit_msg>Improve how GitHub releases are formatted<commit_after>name: Publish Plugin
on:
  push:
    tags:
      - '[0-9].[0-9].[0-9]-[0-9][0-9][0-9][0-9].[1-3]'

jobs:
  publish:
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: 11
      - uses: actions/cache@v2
        with:
          path: |
            ~/.gradle/caches
            ~/.gradle/jdks
            ~/.gradle/native
            ~/.gradle/wrapper
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('gradle.properties') }}
          restore-keys: |
            ${{ runner.os }}-gradle-
      - uses: gradle/wrapper-validation-action@v1
      - name: Setup publish token
        env:
          JETBRAINS_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
        shell: bash
        run: |
          mkdir -p ~/.gradle/
          echo "GRADLE_USER_HOME=$HOME/.gradle" >> "$GITHUB_ENV"
          echo "mcdev.deploy.token=${JETBRAINS_TOKEN}" > ~/.gradle/gradle.properties
          echo "mcdev.deploy.channel=testing" >> ~/.gradle/gradle.properties
      - name: Publish plugin
        run: ./gradlew clean publishPlugin --no-daemon --stacktrace
      - name: Get tag name
        id: get_tag
        # Tag name is reversed from release name due to how IntelilJ parses plugin version numbers
        run: |
          tag_name="$(echo $GITHUB_REF | cut -d / -f 3)"
          echo ::set-output name=tag::$tag_name
          version_array=(${tag_name//-/})
          echo ::set-output name=release::${version_array[1]}-${version_array[0]}
      - name: Create GitHub Release
        uses: softprops/action-gh-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ steps.get_tag.outputs.tag }}
          name: 'Release ${{ steps.get_tag.outputs.release }}'
          body: '## [View all plugin releases here.](https://plugins.jetbrains.com/plugin/8327-minecraft-development/versions/stable/)'
          prerelease: false
          draft: false
          files: build/distributions/*.zip
{'fraction_non_alphanumeric': 0.14943109987357775, 'fraction_numerical': 0.014664981036662453, 'mean_word_length': 1.9368968077208613, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '492558', 'n_tokens_mistral': 1321, 'n_tokens_neox': 1246, 'n_words': 248}