From 7062b8e58a77dc18b430ec108f25bd508b6fd22e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Jan 2024 09:47:30 +0000 Subject: [PATCH] Update CI --- .github/workflows/nuget-push.yml | 45 +++++++++++++++++++++++++++++++ src/The49.Maui.BottomSheet.csproj | 4 +-- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/nuget-push.yml diff --git a/.github/workflows/nuget-push.yml b/.github/workflows/nuget-push.yml new file mode 100644 index 0000000..058d0c1 --- /dev/null +++ b/.github/workflows/nuget-push.yml @@ -0,0 +1,45 @@ +# this is based on https://github.com/irongut/MauiBeach/blob/master/.github/workflows/ci-build.yml +# this might be useful, too: +# https://github.com/dotnet/maui-samples/blob/main/8.0/Apps/WeatherTwentyOne/devops/GitHubActions/ + +name: Nuget push + +on: + push: + tags: + - "*" + workflow_dispatch: + +permissions: + contents: read + +env: + DOTNET_NOLOGO: true # Disable the .NET logo + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience + DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry + +jobs: + # Check if it even builds + sanity-check-build: + runs-on: macos-13 + name: Build + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + + - name: Select Xcode 15.1 + run: sudo xcode-select -s /Applications/Xcode_15.1.app + + - name: Setup .NET according to global.json + uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 + with: + global-json-file: global.json + + - name: Install MAUI Workload + run: dotnet workload install maui + + - name: Build package + run: dotnet pack -c Release src/The49.Maui.BottomSheet.csproj + + - name: Publish + run: nuget src/bin/Debug/The49.Maui.BottomSheet.*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} diff --git a/src/The49.Maui.BottomSheet.csproj b/src/The49.Maui.BottomSheet.csproj index a4cdd63..c26a920 100644 --- a/src/The49.Maui.BottomSheet.csproj +++ b/src/The49.Maui.BottomSheet.csproj @@ -1,7 +1,7 @@  - net8.0-android;net8.0-ios;net8.0-maccatalyst + net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst $(TargetFrameworks);net8.0-windows10.0.19041.0 The49.Maui.BottomSheet @@ -13,7 +13,7 @@ true - 8.0.1 + 8.0.2 11.0