<commit_before>name: Publish Nuget Package

on:
  workflow_run:
    workflows: ["CI"]
    branches: [ main ]
    types:
      - completed
  workflow_dispatch:

jobs:
  publish-nuget:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup .Net Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '6.0.x'
    - name: Get Version
      id: package_version
      uses: KageKirin/get-csproj-version@v1.0.0
      with:
        file: Csp/Csp.csproj
    - name: Install Dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --configuration Release --no-restore
    - name: Package
      run: dotnet pack Csp/Csp.csproj --no-build --configuration Release --include-symbols -p:SymbolPackageFormat=snupkg -o .
    - name: Publish to GitHub
      run: dotnet nuget push *.nupkg --api-key ${{secrets.PKG_GITHUB_TOKEN}} --source "https://nuget.pkg.github.com/lifebeyondfife/index.json" --skip-duplicate
    - name: Publish to Nuget
      run: dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_TOKEN}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate
    - name: Create Tag
      uses: rickstaa/action-create-tag@v1.3.2
      with:
        tag: v${{ steps.package_version.outputs.version }}
        message: "$(git log --format=%B -n 1)"<commit_msg>fix(ci): correct tag message string<commit_after>name: Publish Nuget Package

on:
  workflow_run:
    workflows: ["CI"]
    branches: [ main ]
    types:
      - completed
  workflow_dispatch:

jobs:
  publish-nuget:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup .Net Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '6.0.x'
    - name: Get Version
      id: package_version
      uses: KageKirin/get-csproj-version@v1.0.0
      with:
        file: Csp/Csp.csproj
    - name: Install Dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --configuration Release --no-restore
    - name: Package
      run: dotnet pack Csp/Csp.csproj --no-build --configuration Release --include-symbols -p:SymbolPackageFormat=snupkg -o .
    - name: Publish to GitHub
      run: dotnet nuget push *.nupkg --api-key ${{secrets.PKG_GITHUB_TOKEN}} --source "https://nuget.pkg.github.com/lifebeyondfife/index.json" --skip-duplicate
    - name: Publish to Nuget
      run: dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_TOKEN}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate
    - name: Create Tag
      uses: rickstaa/action-create-tag@v1.3.2
      with:
        tag: v${{ steps.package_version.outputs.version }}
        message: $(git log --format=%B -n 1)
{'fraction_non_alphanumeric': 0.129547141796585, 'fraction_numerical': 0.008908685968819599, 'mean_word_length': 2.4684684684684686, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2241186', 'n_tokens_mistral': 951, 'n_tokens_neox': 931, 'n_words': 219}