fix eol in refactoring #766
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: install .NET Core 8/9/10 SDKs | |
| uses: actions/setup-dotnet@v2 | |
| with: | |
| include-prerelease: false | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: .NET info | |
| run: dotnet --info | |
| shell: pwsh | |
| - name: checkout repository | |
| uses: actions/checkout@v2 | |
| - name: set version | |
| run: | | |
| . ./.github/workflows/ci.ps1 | |
| Set-VersionSuffixOnTag "$Env:GITHUB_WORKSPACE/src" "$Env:GITHUB_REF" | |
| shell: pwsh | |
| - name: dotnet restore | |
| run: dotnet restore | |
| - name: build source generator | |
| run: dotnet build --configuration Release --no-restore src/Thinktecture.Runtime.Extensions.SourceGenerator/Thinktecture.Runtime.Extensions.SourceGenerator.csproj | |
| - name: build source refactorings | |
| run: dotnet build --configuration Release --no-restore src/Thinktecture.Runtime.Extensions.Refactorings/Thinktecture.Runtime.Extensions.Refactorings.csproj | |
| - name: build | |
| run: dotnet build --configuration Release --no-restore | |
| - name: test | |
| run: dotnet test --configuration Release --no-build -p:TestTfmsInParallel=false /nr:false | |
| - name: test results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| id: test-results | |
| if: always() | |
| with: | |
| check_name: tests results | |
| trx_files: "**/test-results/**/*.trx" | |
| - name: test results badge color | |
| shell: bash | |
| run: | | |
| case ${{ fromJSON( steps.test-results.outputs.json ).conclusion }} in | |
| success) | |
| echo "BADGE_COLOR=31c653" >> $GITHUB_ENV | |
| ;; | |
| failure) | |
| echo "BADGE_COLOR=800000" >> $GITHUB_ENV | |
| ;; | |
| neutral) | |
| echo "BADGE_COLOR=696969" >> $GITHUB_ENV | |
| ;; | |
| esac | |
| - name: create test result badge | |
| uses: emibcn/badge-action@d6f51ff11b5c3382b3b88689ae2d6db22d9737d1 | |
| with: | |
| label: tests | |
| status: '${{ fromJSON( steps.test-results.outputs.json ).formatted.stats.tests }} tests, ${{ fromJSON( steps.test-results.outputs.json ).formatted.stats.runs }} runs: ${{ fromJSON( steps.test-results.outputs.json ).conclusion }}' | |
| color: ${{ env.BADGE_COLOR }} | |
| path: badge.svg | |
| - name: Upload badge to Gist | |
| if: > | |
| github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'master' || | |
| github.event_name != 'workflow_run' && github.ref == 'refs/heads/master' | |
| uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d | |
| with: | |
| token: ${{ secrets.GIST_TOKEN }} | |
| gistURL: https://gist.github.com/PawelGerr/043909cfb348b36187d02222da1f372e | |
| file: badge.svg | |
| - name: pack | |
| run: dotnet pack --configuration Release --no-build --output out | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-packages | |
| path: | | |
| out/*.nupkg | |
| out/*.snupkg | |
| if-no-files-found: 'error' | |
| - name: push to nuget.org | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| cd out | |
| dotnet nuget push "*.nupkg" -k "$env:API_KEY" --skip-duplicate | |
| shell: pwsh | |
| env: | |
| API_KEY: ${{ secrets.NUGET_ORG_API_KEY }} |