Merge pull request #163 from FmgLib/v8.8.9 #72
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: "Deploy to Nuget" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| env: | |
| SOLUTION_PATH: './FmgLib.MauiMarkup.sln' | |
| PROJECT_PATH: 'src\FmgLib.MauiMarkup\FmgLib.MauiMarkup.csproj' | |
| PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output | |
| NUGET_API_KEY: ${{ secrets.NUGET_AUTH_TOKEN }} | |
| jobs: | |
| deploy: | |
| name: 'Deploy' | |
| runs-on: 'windows-latest' | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v3 | |
| - name: 'Install dotnet' | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Install MAUI workload | |
| run: dotnet workload install maui | |
| - name: Clean output directory | |
| run: dotnet clean ${{ env.SOLUTION_PATH }} -c Release | |
| - name: Build the solution | |
| run: dotnet build ${{ env.SOLUTION_PATH }} -c Release | |
| - name: Pack NuGet package | |
| run: dotnet pack ${{ env.PROJECT_PATH }} -c Release --no-build -o ${{ env.PACKAGE_OUTPUT_DIRECTORY }} | |
| - name: Push to NuGet | |
| run: | | |
| $nupkgFiles = Get-ChildItem -Path "${{ env.PACKAGE_OUTPUT_DIRECTORY }}" -Filter "*.nupkg" | |
| foreach ($file in $nupkgFiles) { | |
| dotnet nuget push $file.FullName -k ${{ env.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate | |
| } |