Update README.md #72
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: CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
env: | |
BUILD_CONFIG: 'Release' | |
SOLUTION: '.\src\Maui.Plugins.PageResolver.sln' | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get Build Version | |
run: | | |
Import-Module .\build\GetBuildVersion.psm1 | |
Write-Host $Env:GITHUB_REF | |
$version = GetBuildVersion -VersionString $Env:GITHUB_REF | |
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
shell: pwsh | |
# - name: Install workloads | |
# run: dotnet workload install maui maui-windows | |
# - name: Restore dependencies | |
# run: dotnet restore $env:SOLUTION | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.x.x | |
include-prerelease: false | |
- name: Install workloads | |
run: dotnet workload install maui | |
- name: Build | |
run: dotnet build $env:SOLUTION --configuration $env:BUILD_CONFIG -p:Version=$env:BUILD_VERSION #--no-restore | |
# - name: Run tests | |
# run: dotnet test /p:Configuration=$env:BUILD_CONFIG --no-restore --no-build --verbosity normal | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v1.0.5 | |
- name: Publish | |
if: startsWith(github.ref, 'refs/heads/release') | |
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} |