NuGet Push Public #3
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: NuGet Push Public | |
on: [workflow_dispatch] | |
jobs: | |
build-test-prep-push: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
7.0.x | |
8.0.x | |
env: | |
DOTNET_INSTALL_DIR: /usr/share/dotnet | |
- name: Install Maui workloads | |
run: dotnet workload install maui | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Restore dependencies | |
run: dotnet restore ./src/CSharp/Maui/EasyMicroservices.UI.MauiKits.sln | |
- name: Build | |
run: dotnet build ./src/CSharp/Maui/EasyMicroservices.UI.MauiKits.sln --no-restore | |
- name: Test | |
run: dotnet test ./src/CSharp/Maui/EasyMicroservices.UI.MauiKits.sln --no-build --verbosity normal | |
- name: Create the package | |
run: dotnet pack ./src/CSharp/Maui/EasyMicroservices.UI.MauiKits.sln --output nupkgs | |
- name: Publish the package to NuGet.org | |
run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate |