Merge pull request #7 from BibleTalkAI/add-tests #6
This file contains 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: Publish to NuGet | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8' | |
- name: Build | |
run: dotnet build --configuration Release | |
- name: Test | |
run: dotnet test 'BibleTalkAI.LanguageOptions.Tests' --configuration Release --no-restore --no-build --logger trx --results-directory TestResults | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: TestResults | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Push to NuGet | |
run: dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate |