Skip to content

Update FmgLib.MauiMarkup.csproj #76

Update FmgLib.MauiMarkup.csproj

Update FmgLib.MauiMarkup.csproj #76

Workflow file for this run

name: "Deploy to Nuget"
on:
workflow_dispatch:
push:
branches:
- master
- develop
env:
SOLUTION_PATH: './FmgLib.MauiMarkup.sln'
GENERATOR_PROJECT_PATH: 'src\FmgLib.MauiMarkup.Generator\FmgLib.MauiMarkup.Generator.csproj'
MAIN_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 solution
run: dotnet clean ${{ env.SOLUTION_PATH }} -c Release
- name: Build Generator Project
run: dotnet build ${{ env.GENERATOR_PROJECT_PATH }} -c Release
- name: Build and Pack Main Project
run: |
dotnet build ${{ env.MAIN_PROJECT_PATH }} -c Release
dotnet pack ${{ env.MAIN_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
}