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: Publish Nuget Release Package | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Restore dependencies | |
run: dotnet restore ./MudBlazor.Extensions/MudBlazor.Extensions.csproj | |
- name: First Build (ignore errors) | |
continue-on-error: true | |
run: dotnet build ./MudBlazor.Extensions/MudBlazor.Extensions.csproj --configuration Release --no-restore | |
- name: Second Build | |
run: dotnet build ./MudBlazor.Extensions/MudBlazor.Extensions.csproj --configuration Release --no-restore | |
- name: Publish Package | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
shell: pwsh | |
run: | | |
Get-ChildItem -Path MudBlazor.Extensions/bin/Release -Filter *.nupkg | ForEach-Object { | |
dotnet nuget push $_.FullName -k $env:NUGET_API_KEY -s https://api.nuget.org/v3/index.json | |
} |