<commit_before>name: Quarkiverse Release

on:
  pull_request:
    types: [closed]
    paths:
      - '.github/project.yml'

jobs:
  release:
    runs-on: ubuntu-latest
    name: release
    if: ${{github.event.pull_request.merged == true}}

    steps:
      - uses: radcortez/project-metadata-action@main
        name: Retrieve project metadata
        id: metadata
        with:
          github-token: ${{secrets.GITHUB_TOKEN}}
          metadata-file-path: '.github/project.yml'

      - uses: actions/checkout@v2

      - name: Import GPG key
        id: import_gpg
        uses: crazy-max/ghaction-import-gpg@v3
        with:
          gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
          passphrase: ${{ secrets.GPG_PASSPHRASE }}

      - name: Set up JDK 11
        uses: actions/setup-java@v2
        with:
          distribution: temurin
          java-version: 11

      - name: Cache local Maven repository
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-

      - name: Configure Git author
        run: |
          git config --local user.email "<EMAIL>"
          git config --local user.name "GitHub Action"

      - name: Maven release ${{steps.metadata.outputs.current-version}}
        run: |
          gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output maven-settings.xml .github/release/maven-settings.xml.gpg
          git checkout -b release
          mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s maven-settings.xml
          git checkout ${{github.base_ref}}
          git rebase release
          mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease -s maven-settings.xml

      - name: Push changes to ${{github.base_ref}}
        uses: ad-m/github-push-action@v0.6.0
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{github.base_ref}}

      - name: Push tags
        uses: ad-m/github-push-action@v0.6.0
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          tags: true
          branch: ${{github.base_ref}}<commit_msg>Make sure maven-settings.xml is generated outside the working dir<commit_after>name: Quarkiverse Release

on:
  pull_request:
    types: [closed]
    paths:
      - '.github/project.yml'

jobs:
  release:
    runs-on: ubuntu-latest
    name: release
    if: ${{github.event.pull_request.merged == true}}

    steps:
      - uses: radcortez/project-metadata-action@main
        name: Retrieve project metadata
        id: metadata
        with:
          github-token: ${{secrets.GITHUB_TOKEN}}
          metadata-file-path: '.github/project.yml'

      - uses: actions/checkout@v2

      - name: Import GPG key
        id: import_gpg
        uses: crazy-max/ghaction-import-gpg@v3
        with:
          gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
          passphrase: ${{ secrets.GPG_PASSPHRASE }}

      - name: Set up JDK 11
        uses: actions/setup-java@v2
        with:
          distribution: temurin
          java-version: 11

      - name: Cache local Maven repository
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-

      - name: Configure Git author
        run: |
          git config --local user.email "<EMAIL>"
          git config --local user.name "GitHub Action"

      - name: Maven release ${{steps.metadata.outputs.current-version}}
        run: |
          gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output /tmp/maven-settings.xml .github/release/maven-settings.xml.gpg
          git checkout -b release
          mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s /tmp/maven-settings.xml
          git checkout ${{github.base_ref}}
          git rebase release
          mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease -s /tmp/maven-settings.xml

      - name: Push changes to ${{github.base_ref}}
        uses: ad-m/github-push-action@v0.6.0
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{github.base_ref}}

      - name: Push tags
        uses: ad-m/github-push-action@v0.6.0
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          tags: true
          branch: ${{github.base_ref}}
{'fraction_non_alphanumeric': 0.12896450325561856, 'fraction_numerical': 0.00630119722747322, 'mean_word_length': 2.0782159017453137, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 11}, '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': '4236709', 'n_tokens_mistral': 1533, 'n_tokens_neox': 1441, 'n_words': 319}