Update build.yml #11
Workflow file for this run
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: .NET | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore ./src/Pure.Blazor.Components | |
- name: Build | |
run: dotnet build ./src/Pure.Blazor.Components --no-restore | |
- name: Test | |
run: dotnet test ./src/Pure.Blazor.Components --no-build --verbosity normal | |
- name: Debug secrets | |
env: | |
TEST_SECRET: ${{secrets.PB_COMPONENT_TEST_SECRET}} | |
run: echo ${#TEST_SECRET} | |
- name: Publish to NuGet | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: dotnet nuget push --skip-duplicate --api-key ${{secrets.PB_COMPONENTS_NUGET_KEY}} --source 'https://api.nuget.org/v3/index.json' ${{github.workspace}}/src/**/Pure.Blazor.Components.*.nupkg |