Merge pull request #11 from mehyaa/net10 #47
Workflow file for this run
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 Push NuGet Packages | |
| on: | |
| push: | |
| branches: | |
| - edge | |
| workflow_dispatch: | |
| repository_dispatch: | |
| jobs: | |
| build: | |
| env: | |
| BUILD_CONFIG: 'Release' | |
| SOLUTION: 'Convey.sln' | |
| DOTNET_VERSION: 10 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| dotnet-quality: 'ga' | |
| - name: Get Year | |
| id: date | |
| uses: josStorer/get-current-time@v2 | |
| with: | |
| format: YY | |
| - name: Checkout Source | |
| uses: actions/checkout@v2 | |
| - name: Build | |
| run: | | |
| VERSION="${{ steps.date.outputs.formattedTime }}.${{ env.DOTNET_VERSION }}.${{ github.run_number }}" | |
| dotnet build \ | |
| $SOLUTION \ | |
| --configuration $BUILD_CONFIG \ | |
| --verbosity minimal \ | |
| --property:Version="$VERSION" \ | |
| --property:ContinuousIntegrationBuild=true \ | |
| --property:Deterministic=true \ | |
| --property:DeterministicSourcePaths=true \ | |
| --property:SourceLinkCreate=true \ | |
| --property:DebugType=pdbonly \ | |
| --property:IncludeSymbols=true \ | |
| --property:SymbolPackageFormat=snupkg | |
| - name: Run Tests | |
| run: | | |
| dotnet test \ | |
| --configuration $BUILD_CONFIG \ | |
| --no-restore \ | |
| --no-build \ | |
| --verbosity minimal | |
| - name: Publish Packages | |
| run: | | |
| dotnet nuget push \ | |
| **\*.nupkg \ | |
| --source 'https://nuget.pkg.github.com/mehyaa/index.json' \ | |
| --api-key ${{ secrets.GITHUB_TOKEN }} \ | |
| --skip-duplicate | |
| - name: Publish Symbols | |
| run: | | |
| dotnet nuget push \ | |
| **\*.snupkg \ | |
| --source 'https://nuget.pkg.github.com/mehyaa/index.json' \ | |
| --api-key ${{ secrets.GITHUB_TOKEN }} \ | |
| --skip-duplicate |