From eb49885c2b9884a7cf05265ded71b455f251eb3d Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sat, 11 Nov 2023 11:39:56 +0100 Subject: [PATCH] add basic GHA jobs (Windows & Mac) --- .github/workflows/dotnet.yml | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..4e88a31 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,58 @@ +name: ci/github-actions + +on: + push: + branches: [ '**' ] + pull_request: + branches: [ '**' ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + + winBuild: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: nuget/setup-nuget@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Install .NET MAUI + shell: pwsh + run: | + & dotnet nuget locals all --clear + & dotnet workload install maui --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json + & dotnet workload install android ios maccatalyst tvos macos maui wasm-tools maui-maccatalyst --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json + - name: Build library (with nuget package) + run: dotnet build ./Source/OxyPlot.Maui.Skia/OxyPlot.Maui.Skia.csproj /p:Configuration=Release /t:restore,build,pack /p:PackageOutputPath=./nuget /p:Version=$(git describe) /p:ContinuousIntegrationBuild=true /p:DeterministicSourcePaths=false + - name: Build sample + run: dotnet build ./Source/OxyplotMauiSample/OxyplotMauiSample.csproj /p:Configuration=Release /t:restore,build /p:Version=$(git describe) /p:ContinuousIntegrationBuild=true /p:DeterministicSourcePaths=false + - name: Upload packages + uses: actions/upload-artifact@v3 + with: + name: nupkg + path: ./Source/*/nuget/*.nupkg + + macBuild: + runs-on: macos-13 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Install .NET MAUI + run: | + dotnet nuget locals all --clear + dotnet workload install maui --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json + dotnet workload install android ios maccatalyst tvos macos maui wasm-tools maui-maccatalyst --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json + - name: Build library (with nuget package) + run: dotnet build ./Source/OxyPlot.Maui.Skia/OxyPlot.Maui.Skia.csproj /p:Configuration=Release /t:restore,build,pack /p:Version=$(git describe) /p:ContinuousIntegrationBuild=true /p:DeterministicSourcePaths=false + - name: Build sample + run: dotnet build ./Source/OxyplotMauiSample/OxyplotMauiSample.csproj /p:Configuration=Release /t:restore,build /p:Version=$(git describe) /p:ContinuousIntegrationBuild=true /p:DeterministicSourcePaths=false