From 14e23b689ee65a8a0b14071a8690ae6c9cb025ab Mon Sep 17 00:00:00 2001 From: Lamparter <71598437+Lamparter@users.noreply.github.com> Date: Sat, 8 Feb 2025 18:15:23 +0000 Subject: [PATCH 1/3] Add action file --- action.yml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 00000000..9218f91e --- /dev/null +++ b/action.yml @@ -0,0 +1,51 @@ +name: Uno.Check +description: "GitHub Action to setup a remote environment to build Uno Platform apps" + +branding: + icon: 'download' + color: 'red' + +inputs: + target-platform: + description: 'The platform to install dependencies for. See available values at https://platform.uno/docs/articles/external/uno.check/doc/using-uno-check.html' + required: false + default: 'all' + dotnet-version: + description: 'Installs and sets the .NET SDK Version' + required: false + default: '9.0.x' + sdkVersion: + description: 'The version of the Windows Sdk' + required: false + default: '19041' + +runs: + using: "composite" + steps: + # Install .NET + - name: Setup .NET ${{ inputs.dotnet-version }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '${{ inputs.dotnet-version }}' + + # Install Windows SDK + - name: Install Windows SDK ${{ inputs.sdkVersion }} + shell: pwsh + if: ${{ runner.os == 'Windows' }} + uses: Lamparter/Install-WindowsSdk@v1.0.0 + with: + buildNumber: '${{ inputs.sdkVersion }}' + + # Run Uno.Check + - name: Install ${{ inputs.target-platform }} Workloads + shell: pwsh + run: | + dotnet tool install -g uno.check + ("${{ inputs.target-platform }} ".Split(' ') | ForEach-Object { + $target = $_.Replace("_win", "").Replace("_macos", "") + if (![string]::IsNullOrEmpty($target)) { + echo "target: $target" + uno-check -v --ci --non-interactive --fix --target $target --skip vswin --skip vsmac --skip xcode --skip vswinworkloads --skip androidemulator --skip dotnetnewunotemplates + echo "uno-check finished for target: $target " + } + }) From 7e423ba4db25fdaf055dc1c5b9ef0340d0092149 Mon Sep 17 00:00:00 2001 From: Lamparter <71598437+Lamparter@users.noreply.github.com> Date: Tue, 18 Feb 2025 16:09:28 +0000 Subject: [PATCH 2/3] Remove install Windows SDK step --- action.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/action.yml b/action.yml index 9218f91e..5c5657f1 100644 --- a/action.yml +++ b/action.yml @@ -28,14 +28,6 @@ runs: with: dotnet-version: '${{ inputs.dotnet-version }}' - # Install Windows SDK - - name: Install Windows SDK ${{ inputs.sdkVersion }} - shell: pwsh - if: ${{ runner.os == 'Windows' }} - uses: Lamparter/Install-WindowsSdk@v1.0.0 - with: - buildNumber: '${{ inputs.sdkVersion }}' - # Run Uno.Check - name: Install ${{ inputs.target-platform }} Workloads shell: pwsh From cc723858aae46de23add1804868fd03073d1aead Mon Sep 17 00:00:00 2001 From: Lamparter <71598437+Lamparter@users.noreply.github.com> Date: Tue, 18 Feb 2025 16:47:09 +0000 Subject: [PATCH 3/3] Remove unnecessary argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jérôme Laban --- action.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/action.yml b/action.yml index 5c5657f1..1bb2d533 100644 --- a/action.yml +++ b/action.yml @@ -14,10 +14,6 @@ inputs: description: 'Installs and sets the .NET SDK Version' required: false default: '9.0.x' - sdkVersion: - description: 'The version of the Windows Sdk' - required: false - default: '19041' runs: using: "composite"