<commit_before>name: Publish [.NET Core]

on:
  push:
    tags:
      - v*

jobs:
  publish:

    name: Publish
    runs-on: ubuntu-latest

    steps:
      # Build library and run tests
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 3.1.301
      - name: Install dependencies
        run: dotnet restore
      - name: Build
        run: dotnet build --configuration Release --no-restore
      - name: Test
        run: dotnet test --no-restore --verbosity normal

      # Set up environment variables
      # The version number can be extracted from the currently checked out tag,
      # which has the format 'refs/tags/v*'.
      - name: Extract version number
        run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

      # Create the NuGet package
      # Note that we substr the release version to get the numbers only, without
      # the 'v' prefix.
      - name: Pack binary
        run: dotnet pack --configuration Release --no-restore -p:PackageVersion=${RELEASE_VERSION:1}

      # Create a GitHub release
      - name: Create a Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ env.RELEASE_VERSION }}
          release_name: Release ${{ env.RELEASE_VERSION }}
          draft: false
          prerelease: ${{ contains(env.RELEASE_VERSION, '-') }}

      # Push the NuGet package to the package providers
      - name: Push release to NuGet
        run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
      - name: Push release to GitHub
        run: dotnet nuget push **/*.nupkg --source https://nuget.pkg.github.com/beardgame/index.json --skip-duplicate
        env:
          NUGET_AUTH_TOKEN: ${{ github.token }}<commit_msg>👷‍♂️ Use the GitHub token as key when authenticating (#213)<commit_after>name: Publish [.NET Core]

on:
  push:
    tags:
      - v*

jobs:
  publish:

    name: Publish
    runs-on: ubuntu-latest

    steps:
      # Build library and run tests
      - uses: actions/checkout@v2
      - name: Setup .NET Core
        uses: actions/setup-dotnet@v1
        with:
          dotnet-version: 3.1.301
      - name: Install dependencies
        run: dotnet restore
      - name: Build
        run: dotnet build --configuration Release --no-restore
      - name: Test
        run: dotnet test --no-restore --verbosity normal

      # Set up environment variables
      # The version number can be extracted from the currently checked out tag,
      # which has the format 'refs/tags/v*'.
      - name: Extract version number
        run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

      # Create the NuGet package
      # Note that we substr the release version to get the numbers only, without
      # the 'v' prefix.
      - name: Pack binary
        run: dotnet pack --configuration Release --no-restore -p:PackageVersion=${RELEASE_VERSION:1}

      # Create a GitHub release
      - name: Create a Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ env.RELEASE_VERSION }}
          release_name: Release ${{ env.RELEASE_VERSION }}
          draft: false
          prerelease: ${{ contains(env.RELEASE_VERSION, '-') }}

      # Push the NuGet package to the package providers
      - name: Push release to NuGet
        run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
        
      - name: Push release to GitHub
        run: dotnet nuget push **/*.nupkg --source https://nuget.pkg.github.com/beardgame/index.json -k ${{ github.token }} --skip-duplicate
{'fraction_non_alphanumeric': 0.10684304248282879, 'fraction_numerical': 0.005850928516916815, 'mean_word_length': 2.16331456154465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '348415', 'n_tokens_mistral': 1197, 'n_tokens_neox': 1138, 'n_words': 360}