diff --git a/.github/workflows/createrelease_android.yml b/.github/workflows/createrelease_android.yml new file mode 100644 index 00000000..a3b58082 --- /dev/null +++ b/.github/workflows/createrelease_android.yml @@ -0,0 +1,60 @@ +name: Release - Android + +on: + release: + types: [published] + +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: + # MAUI Android Build + release-android: + runs-on: windows-2022 + name: Android Release + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1.1 + with: + vs-prerelease: true + msbuild-architecture: x64 + + - name: Setup .NET 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.200-preview.22055.15 + include-prerelease: true + + - uses: actions/setup-java@v2 + with: + distribution: 'microsoft' + java-version: '11' + + - name: Install MAUI Workloads + run: | + dotnet workload install maui --ignore-failed-sources + dotnet workload install maui-android --ignore-failed-sources + dotnet workload install maui-desktop --ignore-failed-sources + dotnet workload install maui-ios --ignore-failed-sources + dotnet workload install maui-mobile --ignore-failed-sources + dotnet workload install maui-windows --ignore-failed-sources + + - name: Restore Dependencies + run: dotnet restore TransactionMobile.Maui.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json + + - name: Build Code + run: dotnet build TransactionMobile.Maui/TransactionMobile.Maui.csproj -c Release -f net6.0-android --no-restore + + - name: Run Unit Tests + run: dotnet test TransactionMobile.Maui.BusinessLogic.Tests/TransactionMobile.Maui.BusinessLogic.Tests.csproj + + - name: Upload Android Artifact + uses: actions/upload-artifact@v2.3.1 + with: + name: android-ci-build + path: src/TransactionMobile.Maui/bin/Release/net6.0-android/*Signed.a* diff --git a/.github/workflows/createrelease_ios.yml b/.github/workflows/createrelease_ios.yml new file mode 100644 index 00000000..f79c8003 --- /dev/null +++ b/.github/workflows/createrelease_ios.yml @@ -0,0 +1,51 @@ +name: Release - iOS + +on: + release: + types: [published] + +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: +# MAUI iOS Build + release-ios: + runs-on: macos-11 + name: iOS Release + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup .NET 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.200-preview.22055.15 + include-prerelease: true + + - name: Setup .NET 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + include-prerelease: true + + - name: Install MAUI Workloads + run: | + dotnet workload install ios --ignore-failed-sources + dotnet workload install maui --ignore-failed-sources + + - name: Restore Dependencies + run: dotnet restore TransactionMobile.Maui.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json + + - name: Build Code + run: dotnet build TransactionMobile.Maui/TransactionMobile.Maui.csproj -c Release -f net6.0-ios --no-restore + + - name: Run Unit Tests + run: dotnet test TransactionMobile.Maui.BusinessLogic.Tests/TransactionMobile.Maui.BusinessLogic.Tests.csproj + + - name: Upload iOS Artifact + uses: actions/upload-artifact@v2.3.1 + with: + name: ios-ci-build + path: src/TransactionMobile.Maui/bin/Release/net6.0-ios/**/*.app/ diff --git a/.github/workflows/createrelease_maccatalyst.yml b/.github/workflows/createrelease_maccatalyst.yml new file mode 100644 index 00000000..f835432c --- /dev/null +++ b/.github/workflows/createrelease_maccatalyst.yml @@ -0,0 +1,54 @@ +name: Release - MacCatalyst + +on: + release: + types: [published] + +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: + # MAUI MacCatalyst Build + release-mac: + runs-on: macos-11 + name: MacCatalyst Release + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup .NET 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.200-preview.22055.15 + include-prerelease: true + + - name: Setup .NET 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + include-prerelease: true + + #- run: dotnet tool update -g dotnet-vs + + - name: Install MAUI Workloads + run: | + dotnet workload install maccatalyst --ignore-failed-sources + dotnet workload install maui --ignore-failed-sources + + - name: Restore Dependencies + run: dotnet restore TransactionMobile.Maui.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json + + - name: Build Code + run: dotnet build TransactionMobile.Maui/TransactionMobile.Maui.csproj -c Release -f net6.0-maccatalyst --no-restore + + - name: Run Unit Tests + run: dotnet test TransactionMobile.Maui.BusinessLogic.Tests/TransactionMobile.Maui.BusinessLogic.Tests.csproj + + - name: Upload MacCatalyst Artifact + uses: actions/upload-artifact@v2.3.1 + with: + name: macos-ci-build + path: src/TransactionMobile.Maui/bin/Release/net6.0-maccatalyst/**/*.app/ + diff --git a/.github/workflows/createrelease_windows.yml b/.github/workflows/createrelease_windows.yml new file mode 100644 index 00000000..f5fed9d9 --- /dev/null +++ b/.github/workflows/createrelease_windows.yml @@ -0,0 +1,57 @@ +name: Release - Windows + +on: + release: + types: [published] + +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 + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + +jobs: + release-windows: + runs-on: windows-2022 + name: Windows Release + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1.1 + with: + vs-prerelease: true + msbuild-architecture: x64 + + - name: Setup .NET 6 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.200-preview.22055.15 + include-prerelease: true + + - run: dotnet tool update -g dotnet-vs + - run: vs install preview --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools + + - name: Install MAUI Workloads + run: | + dotnet workload install maui --ignore-failed-sources + dotnet workload install maui-desktop --ignore-failed-sources + dotnet workload install maui-mobile --ignore-failed-sources + dotnet workload install maui-windows --ignore-failed-sources + + - name: Restore Dependencies + run: dotnet restore TransactionMobile.Maui.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json + + - name: Build Code + run: | + "C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/MSBuild.exe TransactionMobile.Maui/TransactionMobile.Maui.csproj -r -p:Configuration=Release -p:RestorePackages=true -p:TargetFramework=net6.0-windows10.0.19041 /p:RestoreSources=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" + + - name: Run Unit Tests + run: dotnet test TransactionMobile.Maui.BusinessLogic.Tests/TransactionMobile.Maui.BusinessLogic.Tests.csproj + + - name: Upload Windows Artifact + uses: actions/upload-artifact@v2.3.1 + with: + name: windows-ci-build + path: src/TransactionMobile.Maui/bin/Release/net6.0-windows*/**/TransactionMobile.Maui*.msix