Merge pull request #1 from 01Dri/01Dri-patch-1 #6
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: Build and Publish Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '8.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build project | |
| run: dotnet build --configuration Release --no-restore | |
| # - name: Run tests | |
| # run: dotnet test --filter "FullyQualifiedName~MapperIA.Tests.Mappers.ClassMapper.ClassMapperTests | FullyQualifiedName~MapperIA.Tests.Mappers.PDFMapper.PDFMapperTests" | |
| - name: Publish to GitHub NuGet | |
| run: dotnet nuget push **/bin/Release/*.nupkg --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} | |
| env: | |
| NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Add GitHub NuGet source | |
| run: dotnet nuget add source https://nuget.pkg.github.com/01Dri/index.json --name github --username 01Dri --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text |