From 66d9fd203677ad6381c23499c2c90f49f6e797ee Mon Sep 17 00:00:00 2001 From: Vijay Anand E G <81947404+egvijayanand@users.noreply.github.com> Date: Sun, 19 Jun 2022 00:10:52 +0530 Subject: [PATCH 1/7] Build file updated --- src/VijayAnand.MauiToolkit/Create-Package.bat | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/VijayAnand.MauiToolkit/Create-Package.bat b/src/VijayAnand.MauiToolkit/Create-Package.bat index cf1c8f0..9a8e600 100644 --- a/src/VijayAnand.MauiToolkit/Create-Package.bat +++ b/src/VijayAnand.MauiToolkit/Create-Package.bat @@ -1,31 +1,31 @@ :: Creates a new NuGet package from the project file @echo off -if [%1]==[] (call Error "Build configuration input is not provided." & goto end) +if [%1]==[] (echo Build configuration input is not provided. & goto end) set config=%1 :: Package Name -if not exist CorePackageName.txt (call Error "Core package name file not available." & goto end) +if not exist CorePackageName.txt (echo Core package name file not available. & goto end) set /P corePkgName= Date: Sun, 19 Jun 2022 00:38:30 +0530 Subject: [PATCH 2/7] Build artifacts archived --- .github/workflows/build-maui-toolkit.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-maui-toolkit.yml b/.github/workflows/build-maui-toolkit.yml index 125b16e..fe7fc8b 100644 --- a/.github/workflows/build-maui-toolkit.yml +++ b/.github/workflows/build-maui-toolkit.yml @@ -55,3 +55,15 @@ jobs: - name: Build the Solution in Release mode shell: cmd run: .\Create-Package.bat Release + + - name: Archive VijayAnand.MauiToolkit.Core NuGet package + uses: actions/upload-artifact@v3 + with: + name: archive-core-nuget-package + path: .\VijayAnand.MauiToolkit.Core\bin\Release\VijayAnand.MauiToolkit.Core.1.0.1-pre1.nupkg + + - name: Archive VijayAnand.MauiToolkit NuGet package + uses: actions/upload-artifact@v3 + with: + name: archive-toolkit-nuget-package + path: .\VijayAnand.MauiToolkit\bin\Release\VijayAnand.MauiToolkit.1.0.1-pre1.nupkg From a61916d409418ad646f62f4525a8265ad307e3fd Mon Sep 17 00:00:00 2001 From: Vijay Anand E G <81947404+egvijayanand@users.noreply.github.com> Date: Sun, 19 Jun 2022 00:53:28 +0530 Subject: [PATCH 3/7] Artifacts path updated for archive --- .github/workflows/build-maui-toolkit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-maui-toolkit.yml b/.github/workflows/build-maui-toolkit.yml index fe7fc8b..257fc38 100644 --- a/.github/workflows/build-maui-toolkit.yml +++ b/.github/workflows/build-maui-toolkit.yml @@ -60,10 +60,10 @@ jobs: uses: actions/upload-artifact@v3 with: name: archive-core-nuget-package - path: .\VijayAnand.MauiToolkit.Core\bin\Release\VijayAnand.MauiToolkit.Core.1.0.1-pre1.nupkg + path: VijayAnand.MauiToolkit.Core/bin/Release/VijayAnand.MauiToolkit.Core.1.0.1-pre1.nupkg - name: Archive VijayAnand.MauiToolkit NuGet package uses: actions/upload-artifact@v3 with: name: archive-toolkit-nuget-package - path: .\VijayAnand.MauiToolkit\bin\Release\VijayAnand.MauiToolkit.1.0.1-pre1.nupkg + path: VijayAnand.MauiToolkit/bin/Release/VijayAnand.MauiToolkit.1.0.1-pre1.nupkg From 08c80287e6ff5581344e1f79b01ef814a9b1fcf4 Mon Sep 17 00:00:00 2001 From: Vijay Anand E G <81947404+egvijayanand@users.noreply.github.com> Date: Sun, 19 Jun 2022 01:15:58 +0530 Subject: [PATCH 4/7] Archive path updated from repository root --- .github/workflows/build-maui-toolkit.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-maui-toolkit.yml b/.github/workflows/build-maui-toolkit.yml index 257fc38..34f5c2d 100644 --- a/.github/workflows/build-maui-toolkit.yml +++ b/.github/workflows/build-maui-toolkit.yml @@ -10,6 +10,8 @@ on: # Allows you to run this workflow manually from the Actions tab env: DOTNET_VERSION: '6.0.300' + BUILD_CONFIG: Release + PKG_VERSION: 1.0.1-pre1 # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -47,23 +49,26 @@ jobs: - name: List installed workloads run: dotnet workload list + # List environment variables + - name: List environment variables + run: env + # Restore dependencies - name: Restore dependencies run: dotnet restore # Build the project in Release mode - name: Build the Solution in Release mode - shell: cmd - run: .\Create-Package.bat Release + run: .\Create-Package.bat ${{ env.BUILD_CONFIG }} - name: Archive VijayAnand.MauiToolkit.Core NuGet package uses: actions/upload-artifact@v3 with: name: archive-core-nuget-package - path: VijayAnand.MauiToolkit.Core/bin/Release/VijayAnand.MauiToolkit.Core.1.0.1-pre1.nupkg + path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit.Core/bin/${{ env.BUILD_CONFIG }}/VijayAnand.MauiToolkit.Core.${{ env.PKG_VERSION }}.nupkg - name: Archive VijayAnand.MauiToolkit NuGet package uses: actions/upload-artifact@v3 with: name: archive-toolkit-nuget-package - path: VijayAnand.MauiToolkit/bin/Release/VijayAnand.MauiToolkit.1.0.1-pre1.nupkg + path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit/bin/${{ env.BUILD_CONFIG }}/VijayAnand.MauiToolkit.${{ env.PKG_VERSION }}.nupkg From bf0aed960562dde7b5740063023261c455d7613f Mon Sep 17 00:00:00 2001 From: Vijay Anand E G <81947404+egvijayanand@users.noreply.github.com> Date: Sun, 19 Jun 2022 02:28:03 +0530 Subject: [PATCH 5/7] Environment variables replaced with secrets --- .github/workflows/build-maui-toolkit.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-maui-toolkit.yml b/.github/workflows/build-maui-toolkit.yml index 34f5c2d..1bb266d 100644 --- a/.github/workflows/build-maui-toolkit.yml +++ b/.github/workflows/build-maui-toolkit.yml @@ -9,9 +9,7 @@ on: # Allows you to run this workflow manually from the Actions tab env: - DOTNET_VERSION: '6.0.300' - BUILD_CONFIG: Release - PKG_VERSION: 1.0.1-pre1 + DOTNET_VERSION: '6.0.x' # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -33,42 +31,38 @@ jobs: uses: actions/setup-dotnet@v2 with: # Optional SDK version to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x - dotnet-version: ${{ env.DOTNET_VERSION }} + dotnet-version: ${{ secrets.DOTNET_VERSION }} # Whether prerelease versions should be matched with non-exact versions (for example 5.0.0-preview.6 being matched by 5, 5.0, 5.x or 5.0.x). Defaults to false if not provided. include-prerelease: false # Install Maui workload - name: Install Maui workload - run: dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/6.0.300.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json + run: dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/${{ secrets.DOTNET_VERSION }}.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json # Install WebAssembly workload - name: Install WebAssembly workload - run: dotnet workload install wasm-tools --from-rollback-file https://aka.ms/dotnet/maui/6.0.300.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json + run: dotnet workload install wasm-tools --from-rollback-file https://aka.ms/dotnet/maui/${{ secrets.DOTNET_VERSION }}.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json # List installed workload - name: List installed workloads run: dotnet workload list - # List environment variables - - name: List environment variables - run: env - # Restore dependencies - name: Restore dependencies run: dotnet restore # Build the project in Release mode - name: Build the Solution in Release mode - run: .\Create-Package.bat ${{ env.BUILD_CONFIG }} + run: .\Create-Package.bat ${{ secrets.BUILD_CONFIG }} - name: Archive VijayAnand.MauiToolkit.Core NuGet package uses: actions/upload-artifact@v3 with: name: archive-core-nuget-package - path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit.Core/bin/${{ env.BUILD_CONFIG }}/VijayAnand.MauiToolkit.Core.${{ env.PKG_VERSION }}.nupkg + path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit.Core/bin/${{ secrets.BUILD_CONFIG }}/VijayAnand.MauiToolkit.Core.${{ secrets.PKG_VERSION }}.nupkg - name: Archive VijayAnand.MauiToolkit NuGet package uses: actions/upload-artifact@v3 with: name: archive-toolkit-nuget-package - path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit/bin/${{ env.BUILD_CONFIG }}/VijayAnand.MauiToolkit.${{ env.PKG_VERSION }}.nupkg + path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit/bin/${{ secrets.BUILD_CONFIG }}/VijayAnand.MauiToolkit.${{ secrets.PKG_VERSION }}.nupkg From 1fe722684b585fbbf280fa2d7c8079cccf311507 Mon Sep 17 00:00:00 2001 From: Vijay Anand E G <81947404+egvijayanand@users.noreply.github.com> Date: Sun, 19 Jun 2022 02:44:25 +0530 Subject: [PATCH 6/7] Package version from outside workflow file --- .github/workflows/build-maui-toolkit.yml | 6 +++--- src/VijayAnand.MauiToolkit/Create-Package.bat | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-maui-toolkit.yml b/.github/workflows/build-maui-toolkit.yml index 1bb266d..8ae6fe8 100644 --- a/.github/workflows/build-maui-toolkit.yml +++ b/.github/workflows/build-maui-toolkit.yml @@ -53,16 +53,16 @@ jobs: # Build the project in Release mode - name: Build the Solution in Release mode - run: .\Create-Package.bat ${{ secrets.BUILD_CONFIG }} + run: .\Create-Package.bat ${{ secrets.BUILD_CONFIG }} ${{ secrets:MAUI_TOOLKIT_PKG_VERSION }} - name: Archive VijayAnand.MauiToolkit.Core NuGet package uses: actions/upload-artifact@v3 with: name: archive-core-nuget-package - path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit.Core/bin/${{ secrets.BUILD_CONFIG }}/VijayAnand.MauiToolkit.Core.${{ secrets.PKG_VERSION }}.nupkg + path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit.Core/bin/${{ secrets.BUILD_CONFIG }}/VijayAnand.MauiToolkit.Core.${{ secrets.MAUI_TOOLKIT_PKG_VERSION }}.nupkg - name: Archive VijayAnand.MauiToolkit NuGet package uses: actions/upload-artifact@v3 with: name: archive-toolkit-nuget-package - path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit/bin/${{ secrets.BUILD_CONFIG }}/VijayAnand.MauiToolkit.${{ secrets.PKG_VERSION }}.nupkg + path: src/VijayAnand.MauiToolkit/VijayAnand.MauiToolkit/bin/${{ secrets.BUILD_CONFIG }}/VijayAnand.MauiToolkit.${{ secrets.MAUI_TOOLKIT_PKG_VERSION }}.nupkg diff --git a/src/VijayAnand.MauiToolkit/Create-Package.bat b/src/VijayAnand.MauiToolkit/Create-Package.bat index 9a8e600..41b3f2e 100644 --- a/src/VijayAnand.MauiToolkit/Create-Package.bat +++ b/src/VijayAnand.MauiToolkit/Create-Package.bat @@ -5,6 +5,8 @@ if [%1]==[] (echo Build configuration input is not provided. & goto end) set config=%1 +if not [%2]==[] (set pkgVersion=%2) + :: Package Name if not exist CorePackageName.txt (echo Core package name file not available. & goto end) @@ -23,7 +25,8 @@ if [%toolkitPkgName%]==[] (echo Toolkit package name not configured. & goto end) if not exist PackageVersion.txt (echo Version file not available. & goto end) -set /P pkgVersion= Date: Sun, 19 Jun 2022 02:48:47 +0530 Subject: [PATCH 7/7] Cleared the error in workflow file --- .github/workflows/build-maui-toolkit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-maui-toolkit.yml b/.github/workflows/build-maui-toolkit.yml index 8ae6fe8..2372463 100644 --- a/.github/workflows/build-maui-toolkit.yml +++ b/.github/workflows/build-maui-toolkit.yml @@ -53,7 +53,7 @@ jobs: # Build the project in Release mode - name: Build the Solution in Release mode - run: .\Create-Package.bat ${{ secrets.BUILD_CONFIG }} ${{ secrets:MAUI_TOOLKIT_PKG_VERSION }} + run: .\Create-Package.bat ${{ secrets.BUILD_CONFIG }} ${{ secrets.MAUI_TOOLKIT_PKG_VERSION }} - name: Archive VijayAnand.MauiToolkit.Core NuGet package uses: actions/upload-artifact@v3