<commit_before>name: Handyman.DuckTyping

on:
  push:
    paths:
    - '.github/workflows/Handyman.DuckTyping.yaml'
    - 'src/Handyman.DuckTyping/src/**'
    - 'src/Handyman.DuckTyping/test/**'
  pull_request:
    paths:
    - '.github/workflows/Handyman.DuckTyping.yaml'
    - 'src/Handyman.DuckTyping/src/**'
    - 'src/Handyman.DuckTyping/test/**'
  workflow_dispatch:
    inputs:
      publish:
        description: 'Publish to nuget (true/false)'
        required: false
        default: 'false'

defaults:
  run:
    working-directory: src/Handyman.DuckTyping

jobs:
  build-test-publish:
    runs-on: windows-2019
    env:
      DOTNET_NOLOGO: true
      DOTNET_CLI_TELEMETRY_OPTOUT: true
    steps:
    - uses: actions/checkout@v2
    - name: setup .net core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.x
    - name: build
      run: dotnet build src/Handyman.DuckTyping.csproj --configuration release
    - name: test
      run: dotnet test test/Handyman.DuckTyping.Tests.csproj --configuration release
    - name: publish to nuget
      if: ${{ github.event.inputs.publish == 'true' }}
      run: |
        dotnet pack src/Handyman.DuckTyping.csproj --configuration release --include-symbols --no-restore --no-build --output .artifacts
        get-childitem ./.artifacts/*.nupkg | foreach-object { dotnet nuget push $_ --api-key ${{ secrets.NUGET }} --source https://api.nuget.org/v3/index.json }
        $version = select-string -path src/Handyman.DuckTyping.csproj -pattern "<version>(?<version>.*)</version" | % { $_.Matches[0].Groups['version'] }
        if (!$version) {
          write-error "version not found"
        }
        $tag = "${{ github.workflow }} v$version"
        git tag -a $tag -m $tag
        git push origin --tags<commit_msg>updated Handyman.DuckTyping workflow<commit_after>name: Handyman.DuckTyping

on:
  push:
    paths:
    - '.github/workflows/Handyman.DuckTyping.yaml'
    - 'src/Handyman.DuckTyping/src/**'
    - 'src/Handyman.DuckTyping/test/**'
  pull_request:
    paths:
    - '.github/workflows/Handyman.DuckTyping.yaml'
    - 'src/Handyman.DuckTyping/src/**'
    - 'src/Handyman.DuckTyping/test/**'
  workflow_dispatch:
    inputs:
      publish:
        description: 'Publish to nuget (true/false)'
        required: false
        default: 'false'

defaults:
  run:
    working-directory: src/Handyman.DuckTyping

jobs:
  build-test-publish:
    runs-on: windows-2019
    env:
      DOTNET_NOLOGO: true
      DOTNET_CLI_TELEMETRY_OPTOUT: true
    steps:
    - uses: actions/checkout@v2
    - name: setup .net core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.x
    - name: build
      run: dotnet build src/Handyman.DuckTyping.csproj --configuration release
    - name: test
      run: dotnet test test/Handyman.DuckTyping.Tests.csproj --configuration release
    - name: publish to nuget
      if: ${{ github.event.inputs.publish == 'true' }}
      run: |
        dotnet pack src/Handyman.DuckTyping.csproj --configuration release --include-symbols --no-restore --no-build --output .artifacts
        get-childitem ./.artifacts/*.nupkg | foreach-object { dotnet nuget push $_ --api-key ${{ secrets.NUGET }} --source https://api.nuget.org/v3/index.json }
        $version = select-string -path src/Handyman.DuckTyping.csproj -pattern "<version>(?<version>.*)</version" | % { $_.Matches[0].Groups['version'] }
        if (!$version) {
          write-error "version not found"
        }
        $tag = "Handyman.DuckTyping_v$version"
        git config user.email "<EMAIL>"
        git config user.name "GitHub"
        git tag -a $tag -m $tag
        git push origin --tags
{'fraction_non_alphanumeric': 0.13665943600867678, 'fraction_numerical': 0.005422993492407809, 'mean_word_length': 2.4900662251655628, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 8, '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': '661830', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1250, 'n_words': 248}