Skip to content

Fix macOS detection to include maccatalyst target in desktop platform… #44

Fix macOS detection to include maccatalyst target in desktop platform…

Fix macOS detection to include maccatalyst target in desktop platform… #44

name: Build and Deploy Managed Identity WebAPI
on:
push:
branches:
- main
pull_request:
paths:
- '.github/workflows/deploy-managed-identity-webapi.yml'
- 'src/client/Microsoft.Identity.Client/ManagedIdentity/**'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
working-directory: ./tests/devapps/Managed Identity apps/ManagedIdentityWebApi
run: dotnet restore
- name: Build
working-directory: ./tests/devapps/Managed Identity apps/ManagedIdentityWebApi
run: dotnet build --configuration Release --no-restore
- name: Publish
working-directory: ./tests/devapps/Managed Identity apps/ManagedIdentityWebApi
run: dotnet publish -c Release -o ${{github.workspace}}/publish
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: 'msalmsi'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ${{github.workspace}}/publish
- name: Test deployed endpoint - Get Token
run: |
echo "Testing token endpoint..."
RESPONSE=$(curl -s -X GET "https://msalmsi-buaxcubfa5a9drf9.westus3-01.azurewebsites.net/AppService?resourceuri=https://vault.azure.net")
echo "Response: $RESPONSE"
if echo "$RESPONSE" | grep -q "Access token received"; then
echo "✅ Successfully retrieved access token"
exit 0
else
echo "⚠️ Response received but may need review: $RESPONSE"
exit 0
fi