Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 24 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: CI
on:
push:
branches:
- main
- uno
- release/*/*
pull_request:
branches:
- main
- uno
- release/*/*
workflow_dispatch:

Expand All @@ -18,16 +18,16 @@ env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
NUGET_XMLDOC_MODE: skip
ARTIFACTS_DIR: artifacts
ARTIFACTS_DIR: ${{ github.workspace }}/artifacts

# Required secrets:
# SIGN_AZURE_CLIENT_ID
# SIGN_AZURE_TENANT_ID
# SIGN_AZURE_SUBSCRIPTION_ID
# SIGN_KEY_VAULT_URL
# SIGN_KEY_VAULT_CERTIFICATE_ID
# UNO_NUGET_FEED_API_KEY
# NUGET_ORG_API_KEY
# Required secrets for signing and publishing jobs:
# - SIGN_AZURE_CLIENT_ID: Azure client ID for code signing
# - SIGN_AZURE_TENANT_ID: Azure tenant ID for code signing
# - SIGN_AZURE_SUBSCRIPTION_ID: Azure subscription ID for code signing
# - SIGN_KEY_VAULT_URL: Azure Key Vault URL for code signing
# - SIGN_KEY_VAULT_CERTIFICATE_ID: Key Vault certificate ID for code signing
# - UNO_NUGET_FEED_API_KEY: API key for Uno NuGet feed publishing
# - NUGET_ORG_API_KEY: API key for NuGet.org publishing

jobs:
build:
Expand Down Expand Up @@ -63,33 +63,33 @@ jobs:

- name: Prepare artifacts directory
run: |
rm -rf "$ARTIFACTS_DIR"
mkdir -p "$ARTIFACTS_DIR/log"
rm -rf "${{ env.ARTIFACTS_DIR }}"
mkdir -p "${{ env.ARTIFACTS_DIR }}/log"
- name: Build solution
run: dotnet build MonacoEditorComponent.slnx -c Release -p:ArtifactsPath="$ARTIFACTS_DIR" /bl:"$ARTIFACTS_DIR/log/build.binlog"
run: dotnet build MonacoEditorComponent.slnx -c Release -p:ArtifactsPath="${{ env.ARTIFACTS_DIR }}" /bl:"${{ env.ARTIFACTS_DIR }}/log/build.binlog"
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect environment variable syntax in -p:ArtifactsPath="${{ env.ARTIFACTS_DIR }}". The shell variable expansion syntax ${} is incorrectly wrapping the GitHub Actions expression ${{ env.ARTIFACTS_DIR }}.

GitHub Actions expressions are evaluated before the shell receives the command, so the shell ${} syntax is both unnecessary and potentially problematic. This should be:

run: dotnet build MonacoEditorComponent.slnx -c Release -p:ArtifactsPath="${{ env.ARTIFACTS_DIR }}" /bl:"${{ env.ARTIFACTS_DIR }}/log/build.binlog"

This matches the usage pattern on lines 66, 67, 77, and 85.

Suggested change
run: dotnet build MonacoEditorComponent.slnx -c Release -p:ArtifactsPath="${{ env.ARTIFACTS_DIR }}" /bl:"${{ env.ARTIFACTS_DIR }}/log/build.binlog"
run: dotnet build MonacoEditorComponent.slnx -c Release -p:ArtifactsPath=${{ env.ARTIFACTS_DIR }} /bl:${{ env.ARTIFACTS_DIR }}/log/build.binlog

Copilot uses AI. Check for mistakes.

- name: Upload packages
if: always()
uses: actions/upload-artifact@v4
with:
name: NuGet
path: artifacts/package/release
path: ${{ env.ARTIFACTS_DIR }}/package/release
if-no-files-found: warn

- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: logs
path: artifacts/log
path: ${{ env.ARTIFACTS_DIR }}/log
if-no-files-found: warn

sign:
name: Sign
runs-on: windows-latest
needs: build
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))
if: github.event_name == 'push' && (github.ref == 'refs/heads/uno' || startsWith(github.ref, 'refs/heads/release/'))
environment: PackageSign
permissions:
contents: read
Expand All @@ -102,7 +102,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: NuGet
path: artifacts
path: ${{ env.ARTIFACTS_DIR }}

- name: Setup .NET
uses: actions/setup-dotnet@v4
Expand All @@ -123,7 +123,7 @@ jobs:
- name: Sign artifacts
shell: pwsh
run: >-
./sign code azure-key-vault artifacts/**/*.nupkg --publisher-name "uno.monaco-editor-uwp"
./sign code azure-key-vault ${{ env.ARTIFACTS_DIR }}/**/*.nupkg --publisher-name "uno.monaco-editor-uwp"
--description "Uno Monaco Editor UWP"
--description-url "https://github.com/${{ github.repository }}"
--azure-key-vault-managed-identity true
Expand All @@ -135,13 +135,14 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: NuGet-Signed
path: artifacts
path: ${{ env.ARTIFACTS_DIR }}

publish_dev:
name: Publish Dev
runs-on: ubuntu-latest
environment: Development
needs: sign
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.event_name == 'push' && github.ref == 'refs/heads/uno'
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -159,7 +160,7 @@ jobs:
publish_release_uno:
name: Publish Internal Feed
runs-on: ubuntu-latest
environment: Stable
environment: Production
needs: sign
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/')
steps:
Expand All @@ -174,7 +175,7 @@ jobs:
publish_release_nuget_org:
name: Publish Production
runs-on: ubuntu-latest
environment: Stable
environment: Production
needs: publish_release_uno
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/')
permissions:
Expand Down
Loading