diff --git a/.AL-Go/cloudDevEnv.ps1 b/.AL-Go/cloudDevEnv.ps1 index 2aeb4a7..84a82ed 100644 --- a/.AL-Go/cloudDevEnv.ps1 +++ b/.AL-Go/cloudDevEnv.ps1 @@ -28,11 +28,11 @@ Write-Host -ForegroundColor Yellow @' $webClient = New-Object System.Net.WebClient $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore) $webClient.Encoding = [System.Text.Encoding]::UTF8 -$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/Github-Helper.psm1' +$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/Github-Helper.psm1' Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" $webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath) -$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/AL-Go-Helper.ps1' +$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/AL-Go-Helper.ps1' Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" $webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath) diff --git a/.AL-Go/localDevEnv.ps1 b/.AL-Go/localDevEnv.ps1 index 8e8e837..105816d 100644 --- a/.AL-Go/localDevEnv.ps1 +++ b/.AL-Go/localDevEnv.ps1 @@ -32,11 +32,11 @@ Write-Host -ForegroundColor Yellow @' $webClient = New-Object System.Net.WebClient $webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore) $webClient.Encoding = [System.Text.Encoding]::UTF8 -$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/Github-Helper.psm1' +$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/Github-Helper.psm1' Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl" $GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1" $webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath) -$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/AL-Go-Helper.ps1' +$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/AL-Go-Helper.ps1' Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" $webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath) diff --git a/.github/RELEASENOTES.copy.md b/.github/RELEASENOTES.copy.md index 5a0887f..402d720 100644 --- a/.github/RELEASENOTES.copy.md +++ b/.github/RELEASENOTES.copy.md @@ -1,3 +1,39 @@ +## v5.2 + +### Issues +- Issue 1084 Automatic updates for AL-Go are failing when main branch requires Pull Request + +### New Settings + +- `PowerPlatformSolutionFolder`: Contains the name of the folder containing a PowerPlatform Solution (only one) +- `DeployTo` now has two additional properties `companyId` is the Company Id from Business Central (for PowerPlatform connection) and `ppEnvironmentUrl` is the Url of the PowerPlatform environment to deploy to. + +### New Actions + +- `BuildPowerPlatform`: to build a PowerPlatform Solution +- `DeployPowerPlatform`: to deploy a PowerPlatform Solution +- `PullPowerPlatformChanges`: to pull changes made in PowerPlatform studio into the repository +- `ReadPowerPlatformSettings`: to read settings and secrets for PowerPlatform deployment +- `GetArtifactsForDeployment`: originally code from deploy.ps1 to retrieve artifacts for releases or builds - now as an action to read apps into a folder. + +### New Workflows + +- **Pull PowerPlatform Changes** for pulling changes from your PowerPlatform development environment into your AL-Go for GitHub repository +- **Push PowerPlatform Changes** for pushing changes from your AL-Go for GitHub repository to your PowerPlatform development environment + +> [!NOTE] +> PowerPlatform workflows are only available in the PTE template and will be removed if no PowerPlatformSolutionFolder is defined in settings. + +### New Scenarios (Documentation) + +- [Connect your GitHub repository to Power Platform](https://github.com/microsoft/AL-Go/blob/main/Scenarios/SetupPowerPlatform.md) +- [How to set up Service Principal for Power Platform](https://github.com/microsoft/AL-Go/blob/main/Scenarios/SetupServicePrincipalForPowerPlatform.md) +- [Try one of the Business Central and Power Platform samples](https://github.com/microsoft/AL-Go/blob/main/Scenarios/TryPowerPlatformSamples.md) +- [Publish To AppSource](https://github.com/microsoft/AL-Go/blob/main/Scenarios/PublishToAppSource.md) + +> [!NOTE] +> PowerPlatform functionality are only available in the PTE template. + ## v5.1 ### Issues diff --git a/.github/workflows/AddExistingAppOrTestApp.yaml b/.github/workflows/AddExistingAppOrTestApp.yaml index 62b4ff8..88ba0d7 100644 --- a/.github/workflows/AddExistingAppOrTestApp.yaml +++ b/.github/workflows/AddExistingAppOrTestApp.yaml @@ -39,7 +39,7 @@ jobs: runs-on: [ windows-latest ] steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -48,19 +48,19 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0090" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -68,7 +68,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Add existing app - uses: microsoft/AL-Go-Actions/AddExistingApp@v5.1 + uses: microsoft/AL-Go-Actions/AddExistingApp@v5.2 with: shell: powershell token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -79,7 +79,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0090" diff --git a/.github/workflows/CICD.yaml b/.github/workflows/CICD.yaml index 38eea0e..af7e1d2 100644 --- a/.github/workflows/CICD.yaml +++ b/.github/workflows/CICD.yaml @@ -40,10 +40,11 @@ jobs: projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} + powerPlatformSolutionFolder: ${{ steps.DeterminePowerPlatformSolutionFolder.outputs.powerPlatformSolutionFolder }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -54,17 +55,17 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0091" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - get: type + get: type, powerPlatformSolutionFolder - name: Determine Workflow Depth id: DetermineWorkflowDepth @@ -73,14 +74,20 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.2 with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} + - name: Determine PowerPlatform Solution Folder + id: DeterminePowerPlatformSolutionFolder + if: env.type == 'PTE' + run: | + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "powerPlatformSolutionFolder=$($env:powerPlatformSolutionFolder)" + - name: Determine Delivery Target Secrets id: DetermineDeliveryTargetSecrets - uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.1 + uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.2 with: shell: powershell projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}' @@ -88,7 +95,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -96,7 +103,7 @@ jobs: - name: Determine Delivery Targets id: DetermineDeliveryTargets - uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.1 + uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v5.2 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -106,7 +113,7 @@ jobs: - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.1 + uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.2 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -122,13 +129,13 @@ jobs: uses: actions/checkout@v4 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell get: templateUrl - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.1 + uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.2 with: shell: powershell templateUrl: ${{ env.templateUrl }} @@ -158,9 +165,23 @@ jobs: signArtifacts: true useArtifactCache: true + BuildPP: + needs: [ Initialization ] + if: (!failure()) && (!cancelled()) && needs.Initialization.outputs.powerPlatformSolutionFolder != '' + name: Build PowerPlatform Solution + uses: ./.github/workflows/_BuildPowerPlatformSolution.yaml + secrets: inherit + with: + shell: ${{ needs.Initialization.outputs.githubRunnerShell }} + runsOn: ${{ needs.Initialization.outputs.githubRunner }} + parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} + project: ${{ needs.Initialization.outputs.powerPlatformSolutionFolder }} + projectName: ${{ needs.Initialization.outputs.powerPlatformSolutionFolder }} + publishArtifacts: ${{ github.ref_name == 'main' || startswith(github.ref_name, 'release/') || startswith(github.ref_name, 'releases/') || needs.Initialization.outputs.deliveryTargetsJson != '[]' || needs.Initialization.outputs.environmentCount > 0 }} + DeployALDoc: needs: [ Initialization, Build ] - if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.generateALDocArtifact == 1 && github.ref_name == 'main' + if: (!cancelled()) && needs.Build.result == 'Success' && needs.Initialization.outputs.generateALDocArtifact == 1 && github.ref_name == 'main' runs-on: windows-latest name: Deploy Reference Documentation permissions: @@ -181,7 +202,7 @@ jobs: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell @@ -190,7 +211,7 @@ jobs: uses: actions/configure-pages@v5 - name: Build Reference Documentation - uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v5.1 + uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v5.2 with: shell: powershell artifacts: '.artifacts' @@ -206,8 +227,8 @@ jobs: uses: actions/deploy-pages@v4 Deploy: - needs: [ Initialization, Build ] - if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.environmentCount > 0 + needs: [ Initialization, Build, BuildPP ] + if: (!cancelled()) && (needs.Build.result == 'success' || needs.Build.result == 'skipped') && (needs.BuildPP.result == 'success' || needs.BuildPP.result == 'skipped') && needs.Initialization.outputs.environmentCount > 0 strategy: ${{ fromJson(needs.Initialization.outputs.environmentsMatrixJson) }} runs-on: ${{ fromJson(matrix.os) }} name: Deploy to ${{ matrix.environment }} @@ -227,9 +248,10 @@ jobs: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: ${{ matrix.shell }} + get: type,powerPlatformSolutionFolder - name: EnvName id: envName @@ -240,27 +262,38 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: ${{ matrix.shell }} gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext,${{ steps.envName.outputs.envName }}-EnvironmentName,${{ steps.envName.outputs.envName }}_EnvironmentName,EnvironmentName,projects' - - name: Deploy + - name: Deploy to Business Central id: Deploy - uses: microsoft/AL-Go-Actions/Deploy@v5.1 + uses: microsoft/AL-Go-Actions/Deploy@v5.2 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: shell: ${{ matrix.shell }} environmentName: ${{ matrix.environment }} - artifacts: '.artifacts' + artifactsFolder: '.artifacts' type: 'CD' deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }} + - name: Deploy to Power Platform + if: env.type == 'PTE' && env.powerPlatformSolutionFolder != '' + uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v5.2 + env: + Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' + with: + shell: powershell + environmentName: ${{ matrix.environment }} + artifactsFolder: '.artifacts' + deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }} + Deliver: - needs: [ Initialization, Build ] - if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.deliveryTargetsJson != '[]' + needs: [ Initialization, Build, BuildPP ] + if: (!cancelled()) && (needs.Build.result == 'success' || needs.Build.result == 'skipped') && (needs.BuildPP.result == 'success' || needs.BuildPP.result == 'skipped') && needs.Initialization.outputs.deliveryTargetsJson != '[]' strategy: matrix: deliveryTarget: ${{ fromJson(needs.Initialization.outputs.deliveryTargetsJson) }} @@ -277,20 +310,20 @@ jobs: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ matrix.deliveryTarget }}Context' - name: Deliver - uses: microsoft/AL-Go-Actions/Deliver@v5.1 + uses: microsoft/AL-Go-Actions/Deliver@v5.2 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -301,7 +334,7 @@ jobs: artifacts: '.artifacts' PostProcess: - needs: [ Initialization, Build, Deploy, Deliver, DeployALDoc ] + needs: [ Initialization, Build, BuildPP, Deploy, Deliver, DeployALDoc ] if: (!cancelled()) runs-on: [ windows-latest ] steps: @@ -310,7 +343,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0091" diff --git a/.github/workflows/CreateApp.yaml b/.github/workflows/CreateApp.yaml index d09b871..a65256e 100644 --- a/.github/workflows/CreateApp.yaml +++ b/.github/workflows/CreateApp.yaml @@ -49,7 +49,7 @@ jobs: runs-on: [ windows-latest ] steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -58,20 +58,20 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0092" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell get: type - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -79,7 +79,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Creating a new app - uses: microsoft/AL-Go-Actions/CreateApp@v5.1 + uses: microsoft/AL-Go-Actions/CreateApp@v5.2 with: shell: powershell token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -94,7 +94,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0092" diff --git a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml index f83af68..e2998c3 100644 --- a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml +++ b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml @@ -48,7 +48,7 @@ jobs: githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -57,20 +57,20 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0093" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -89,7 +89,7 @@ jobs: Write-Host "AdminCenterApiCredentials not provided, initiating Device Code flow" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -111,13 +111,13 @@ jobs: uses: actions/checkout@v4 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -136,7 +136,7 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -value "adminCenterApiCredentials=$adminCenterApiCredentials" - name: Create Development Environment - uses: microsoft/AL-Go-Actions/CreateDevelopmentEnvironment@v5.1 + uses: microsoft/AL-Go-Actions/CreateDevelopmentEnvironment@v5.2 with: shell: powershell token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -149,7 +149,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0093" diff --git a/.github/workflows/CreatePerformanceTestApp.yaml b/.github/workflows/CreatePerformanceTestApp.yaml index c7e5d6d..516531b 100644 --- a/.github/workflows/CreatePerformanceTestApp.yaml +++ b/.github/workflows/CreatePerformanceTestApp.yaml @@ -55,7 +55,7 @@ jobs: runs-on: [ windows-latest ] steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -64,19 +64,19 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0102" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -84,7 +84,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Creating a new test app - uses: microsoft/AL-Go-Actions/CreateApp@v5.1 + uses: microsoft/AL-Go-Actions/CreateApp@v5.2 with: shell: powershell token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -100,7 +100,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0102" diff --git a/.github/workflows/CreateRelease.yaml b/.github/workflows/CreateRelease.yaml index 2bb83da..3d9c7e5 100644 --- a/.github/workflows/CreateRelease.yaml +++ b/.github/workflows/CreateRelease.yaml @@ -72,7 +72,7 @@ jobs: releaseVersion: ${{ steps.createreleasenotes.outputs.releaseVersion }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -81,21 +81,21 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0094" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - get: templateUrl,repoName + get: templateUrl,repoName,type,powerPlatformSolutionFolder - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -104,12 +104,12 @@ jobs: - name: Determine Projects id: determineProjects - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.2 with: shell: powershell - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.1 + uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.2 with: shell: powershell templateUrl: ${{ env.templateUrl }} @@ -117,11 +117,18 @@ jobs: - name: Analyze Artifacts id: analyzeartifacts + env: + _appVersion: ${{ github.event.inputs.appVersion }} run: | $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 $projects = '${{ steps.determineProjects.outputs.ProjectsJson }}' | ConvertFrom-Json Write-Host "projects:" $projects | ForEach-Object { Write-Host "- $_" } + if ($env:type -eq "PTE" -and $env:powerPlatformSolutionFolder -ne "") { + Write-Host "PowerPlatformSolution:" + Write-Host "- $($env:powerPlatformSolutionFolder)" + $projects += @($env:powerPlatformSolutionFolder) + } $include = @() $sha = '' $allArtifacts = @() @@ -149,17 +156,18 @@ jobs: } $refname = "$ENV:GITHUB_REF_NAME".Replace('/','_') Write-Host "Analyzing artifacts for project $project" - $appVersion = '${{ github.event.inputs.appVersion }}' + $appVersion = "$env:_appVersion" if ($appVersion -eq "latest") { Write-Host "Grab latest" - $artifact = $allArtifacts | Where-Object { $_.name -like "$project-$refname-Apps-*" } | Select-Object -First 1 + $artifact = $allArtifacts | Where-Object { $_.name -like "$project-$refname-Apps-*" -or $_.name -like "$project-$refname-PowerPlatformSolution-*" } | Select-Object -First 1 } else { - Write-Host "Search for $project-$refname-Apps-$appVersion" - $artifact = $allArtifacts | Where-Object { $_.name -eq "$project-$refname-Apps-$appVersion" } | Select-Object -First 1 + Write-Host "Search for $project-$refname-Apps-$appVersion or $project-$refname-PowerPlatformSolution-$appVersion" + $artifact = $allArtifacts | Where-Object { $_.name -eq "$project-$refname-Apps-$appVersion"-or $_.name -eq "$project-$refname-PowerPlatformSolution-$appVersion" } | Select-Object -First 1 } if ($artifact) { - $artifactsVersion = $artifact.name.SubString($artifact.name.LastIndexOf('-Apps-')+6) + $startIndex = $artifact.name.LastIndexOf('-') + 1 + $artifactsVersion = $artifact.name.SubString($startIndex) } else { Write-Host "::Error::No artifacts found for this project" @@ -175,13 +183,14 @@ jobs: $sha = $artifact.workflow_run.head_sha } - $allArtifacts | Where-Object { ($_.name -like "$project-$refname-Apps-$($artifactsVersion)" -or $_.name -like "$project-$refname-TestApps-$($artifactsVersion)" -or $_.name -like "$project-$refname-Dependencies-$($artifactsVersion)") } | ForEach-Object { + Write-host "Looking for $project-$refname-Apps-$artifactsVersion or $project-$refname-TestApps-$artifactsVersion or $project-$refname-Dependencies-$artifactsVersion or $project-$refname-PowerPlatformSolution-$artifactsVersion" + $allArtifacts | Where-Object { ($_.name -like "$project-$refname-Apps-$artifactsVersion" -or $_.name -like "$project-$refname-TestApps-$artifactsVersion" -or $_.name -like "$project-$refname-Dependencies-$artifactsVersion" -or $_.name -like "$project-$refname-PowerPlatformSolution-$artifactsVersion") } | ForEach-Object { $atype = $_.name.SubString(0,$_.name.Length-$artifactsVersion.Length-1) $atype = $atype.SubString($atype.LastIndexOf('-')+1) $include += $( [ordered]@{ "name" = $_.name; "url" = $_.archive_download_url; "atype" = $atype; "project" = $thisproject } ) } if ($include.Count -eq 0) { - Write-Host "::Error::No artifacts found" + Write-Host "::Error::No artifacts found for version $artifactsVersion" exit 1 } } @@ -194,7 +203,7 @@ jobs: - name: Prepare release notes id: createreleasenotes - uses: microsoft/AL-Go-Actions/CreateReleaseNotes@v5.1 + uses: microsoft/AL-Go-Actions/CreateReleaseNotes@v5.2 with: shell: powershell parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} @@ -237,13 +246,13 @@ jobs: uses: actions/checkout@v4 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -281,7 +290,7 @@ jobs: }); - name: Deliver to NuGet - uses: microsoft/AL-Go-Actions/Deliver@v5.1 + uses: microsoft/AL-Go-Actions/Deliver@v5.2 if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).nuGetContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -294,7 +303,7 @@ jobs: atypes: 'Apps,TestApps' - name: Deliver to Storage - uses: microsoft/AL-Go-Actions/Deliver@v5.1 + uses: microsoft/AL-Go-Actions/Deliver@v5.2 if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).storageContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -338,13 +347,13 @@ jobs: uses: actions/checkout@v4 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -352,7 +361,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Update Version Number - uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v5.1 + uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v5.2 with: shell: powershell token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -370,7 +379,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0094" diff --git a/.github/workflows/CreateTestApp.yaml b/.github/workflows/CreateTestApp.yaml index b605917..35efcdc 100644 --- a/.github/workflows/CreateTestApp.yaml +++ b/.github/workflows/CreateTestApp.yaml @@ -51,7 +51,7 @@ jobs: runs-on: [ windows-latest ] steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -60,19 +60,19 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0095" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -80,7 +80,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Creating a new test app - uses: microsoft/AL-Go-Actions/CreateApp@v5.1 + uses: microsoft/AL-Go-Actions/CreateApp@v5.2 with: shell: powershell token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -95,7 +95,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0095" diff --git a/.github/workflows/Current.yaml b/.github/workflows/Current.yaml index da78220..7185430 100644 --- a/.github/workflows/Current.yaml +++ b/.github/workflows/Current.yaml @@ -30,7 +30,7 @@ jobs: workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -41,14 +41,14 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0101" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell @@ -59,7 +59,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.2 with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} @@ -96,7 +96,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0101" diff --git a/.github/workflows/DeployReferenceDocumentation.yaml b/.github/workflows/DeployReferenceDocumentation.yaml index a10a071..32701ee 100644 --- a/.github/workflows/DeployReferenceDocumentation.yaml +++ b/.github/workflows/DeployReferenceDocumentation.yaml @@ -30,19 +30,19 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0097" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.1 + uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.2 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -55,7 +55,7 @@ jobs: uses: actions/configure-pages@v5 - name: Build Reference Documentation - uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v5.1 + uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v5.2 with: shell: powershell artifacts: 'latest' diff --git a/.github/workflows/IncrementVersionNumber.yaml b/.github/workflows/IncrementVersionNumber.yaml index e63bcd1..c6c65d3 100644 --- a/.github/workflows/IncrementVersionNumber.yaml +++ b/.github/workflows/IncrementVersionNumber.yaml @@ -39,7 +39,7 @@ jobs: runs-on: [ windows-latest ] steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -48,19 +48,19 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0096" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -68,7 +68,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Increment Version Number - uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v5.1 + uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v5.2 with: shell: powershell token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -79,7 +79,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0096" diff --git a/.github/workflows/NextMajor.yaml b/.github/workflows/NextMajor.yaml index fcc2465..e6914a0 100644 --- a/.github/workflows/NextMajor.yaml +++ b/.github/workflows/NextMajor.yaml @@ -30,7 +30,7 @@ jobs: workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -41,14 +41,14 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0099" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell @@ -59,7 +59,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.2 with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} @@ -96,7 +96,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0099" diff --git a/.github/workflows/NextMinor.yaml b/.github/workflows/NextMinor.yaml index 3303c39..8f8cf54 100644 --- a/.github/workflows/NextMinor.yaml +++ b/.github/workflows/NextMinor.yaml @@ -30,7 +30,7 @@ jobs: workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -41,14 +41,14 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0100" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell @@ -59,7 +59,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.2 with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} @@ -96,7 +96,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0100" diff --git a/.github/workflows/PublishToEnvironment.yaml b/.github/workflows/PublishToEnvironment.yaml index 1ea28d5..90c0372 100644 --- a/.github/workflows/PublishToEnvironment.yaml +++ b/.github/workflows/PublishToEnvironment.yaml @@ -35,7 +35,7 @@ jobs: deviceCode: ${{ steps.Authenticate.outputs.deviceCode }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -44,20 +44,20 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0097" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.1 + uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.2 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -75,7 +75,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 if: steps.DetermineDeploymentEnvironments.outputs.UnknownEnvironment == 1 with: shell: powershell @@ -107,7 +107,7 @@ jobs: Write-Host "No AuthContext provided for $envName, initiating Device Code flow" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.1/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -141,30 +141,49 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "envName=$envName" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: ${{ matrix.shell }} + get: type,powerPlatformSolutionFolder - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: ${{ matrix.shell }} gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext,${{ steps.envName.outputs.envName }}-EnvironmentName,${{ steps.envName.outputs.envName }}_EnvironmentName,EnvironmentName,projects' - - name: Deploy + - name: Get Artifacts for deployment + uses: microsoft/AL-Go-Actions/GetArtifactsForDeployment@v5.2 + with: + shell: powershell + artifactsVersion: ${{ github.event.inputs.appVersion }} + artifactsFolder: '.artifacts' + + - name: Deploy to Business Central id: Deploy - uses: microsoft/AL-Go-Actions/Deploy@v5.1 + uses: microsoft/AL-Go-Actions/Deploy@v5.2 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: shell: ${{ matrix.shell }} environmentName: ${{ matrix.environment }} - artifacts: ${{ github.event.inputs.appVersion }} + artifactsFolder: '.artifacts' type: 'Publish' deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }} + - name: Deploy to Power Platform + if: env.type == 'PTE' && env.powerPlatformSolutionFolder != '' + uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v5.2 + env: + Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' + with: + shell: powershell + environmentName: ${{ matrix.environment }} + artifactsFolder: '.artifacts' + deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }} + PostProcess: needs: [ Initialization, Deploy ] if: always() @@ -175,7 +194,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0097" diff --git a/.github/workflows/PullPowerPlatformChanges.yaml b/.github/workflows/PullPowerPlatformChanges.yaml new file mode 100644 index 0000000..ac32a0a --- /dev/null +++ b/.github/workflows/PullPowerPlatformChanges.yaml @@ -0,0 +1,108 @@ +name: ' Pull Power Platform changes' + +on: + workflow_dispatch: + inputs: + environment: + description: Environment to pull changes from + required: true + solutionFolder: + description: Folder name of the Power Platform solution (leave empty to use AL-Go setting) + required: false + directCommit: + description: Direct Commit? + type: boolean + default: false + useGhTokenWorkflow: + description: Use GhTokenWorkflow for PR/Commit? + type: boolean + default: false + +permissions: + contents: write + pull-requests: write + +defaults: + run: + shell: powershell + +jobs: + PullChanges: + runs-on: [windows-latest] + name: Pull changes from ${{ inputs.environment }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Initialize the workflow + id: init + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 + with: + shell: powershell + eventId: "DO0103" + + - name: EnvName + env: + _environment: ${{ inputs.environment }} + run: | + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + $envName = "$env:_environment".Split(' ')[0] + Add-Content -encoding utf8 -Path $env:GITHUB_ENV -Value "envName=$envName" + + - name: Read settings + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 + with: + shell: powershell + get: powerPlatformSolutionFolder + + - name: Read secrets + id: ReadSecrets + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 + with: + shell: powershell + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '${{ env.envName }}-AuthContext,${{ env.envName }}_AuthContext,AuthContext,TokenForPush' + useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' + + - name: Determine Deployment Environments + id: DetermineDeploymentEnvironments + uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.2 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + shell: powershell + getEnvironments: ${{ inputs.environment }} + type: 'All' + + - name: Set Power Platform solution folder + env: + _solutionFolder: ${{ inputs.solutionFolder }} + run: | + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + $solutionFolder = $env:_solutionFolder + if ($solutionFolder -eq '') { + Write-Host "Solution folder is not provided. Taking the folder from AL-Go settings" + $solutionFolder = $env:powerPlatformSolutionFolder + } + Write-Host "Solution folder: $solutionFolder" + Add-Content -encoding utf8 -Path $env:GITHUB_ENV -Value "solutionFolder=$solutionFolder" + + - name: Pull changes from Power Platform environment + uses: microsoft/AL-Go-Actions/PullPowerPlatformChanges@v5.2 + env: + Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' + with: + shell: powershell + token: ${{ steps.ReadSecrets.outputs.TokenForPush }} + directCommit: ${{ inputs.directCommit }} + environmentName: ${{ inputs.environment }} + solutionFolder: ${{ env.solutionFolder }} + deploymentEnvironmentsJson: ${{ steps.DetermineDeploymentEnvironments.outputs.deploymentEnvironmentsJson }} + + - name: Finalize the workflow + if: always() + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 + with: + shell: powershell + eventId: "DO0103" + telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} diff --git a/.github/workflows/PullRequestHandler.yaml b/.github/workflows/PullRequestHandler.yaml index 55a75a2..53dea08 100644 --- a/.github/workflows/PullRequestHandler.yaml +++ b/.github/workflows/PullRequestHandler.yaml @@ -27,7 +27,7 @@ jobs: if: (github.event.pull_request.base.repo.full_name != github.event.pull_request.head.repo.full_name) && (github.event_name != 'pull_request') runs-on: windows-latest steps: - - uses: microsoft/AL-Go-Actions/VerifyPRChanges@v5.1 + - uses: microsoft/AL-Go-Actions/VerifyPRChanges@v5.2 Initialization: needs: [ PregateCheck ] @@ -44,7 +44,7 @@ jobs: workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -56,14 +56,14 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0104" - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell @@ -74,7 +74,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v5.2 with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} @@ -111,7 +111,7 @@ jobs: steps: - name: Pull Request Status Check id: PullRequestStatusCheck - uses: microsoft/AL-Go-Actions/PullRequestStatusCheck@v5.1 + uses: microsoft/AL-Go-Actions/PullRequestStatusCheck@v5.2 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PushPowerPlatformChanges.yaml b/.github/workflows/PushPowerPlatformChanges.yaml new file mode 100644 index 0000000..4090c8b --- /dev/null +++ b/.github/workflows/PushPowerPlatformChanges.yaml @@ -0,0 +1,97 @@ +name: " Push Power Platform changes" + +on: + workflow_dispatch: + inputs: + environment: + description: Environment to push changes to + required: true + solutionFolder: + description: Folder name of the Power Platform solution (leave empty to use AL-Go setting) + required: false + +permissions: + contents: read + +defaults: + run: + shell: powershell + +jobs: + PushChanges: + runs-on: [windows-latest] + name: Push changes to ${{ inputs.environment }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Initialize the workflow + id: init + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 + with: + shell: powershell + eventId: "DO0103" + + - name: EnvName + env: + _environment: ${{ inputs.environment }} + run: | + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + # Environment names can contains spaces and tags (like (PROD) etc. We need to remove them to get the correct environment name) + $envName = "$env:_environment".Split(' ')[0] + Add-Content -encoding utf8 -Path $env:GITHUB_ENV -Value "envName=$envName" + + - name: Read settings + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 + with: + shell: powershell + get: powerPlatformSolutionFolder + + - name: Read secrets + id: ReadSecrets + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 + with: + shell: powershell + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '${{ env.envName }}-AuthContext,${{ env.envName }}_AuthContext,AuthContext' + + - name: Determine Deployment Environments + id: DetermineDeploymentEnvironments + uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v5.2 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + shell: powershell + getEnvironments: ${{ inputs.environment }} + type: 'All' + + - name: Set Power Platform solution folder + env: + _solutionFolder: ${{ inputs.solutionFolder }} + run: | + $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + $solutionFolder = $env:_solutionFolder + if ($solutionFolder -eq '') { + Write-Host "Solution folder is not provided. Taking the folder from AL-Go settings" + $solutionFolder = $env:powerPlatformSolutionFolder + } + Write-Host "Solution folder: $solutionFolder" + Add-Content -encoding utf8 -Path $env:GITHUB_ENV -Value "solutionFolder=$solutionFolder" + + - name: Export and push changes to Power Platform + uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v5.2 + env: + Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' + with: + shell: powershell + environmentName: ${{ inputs.environment }} + solutionFolder: ${{ env.solutionFolder }} + deploymentEnvironmentsJson: ${{ steps.DetermineDeploymentEnvironments.outputs.deploymentEnvironmentsJson }} + + - name: Finalize the workflow + if: always() + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 + with: + shell: powershell + eventId: "DO0103" + telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} diff --git a/.github/workflows/Troubleshooting.yaml b/.github/workflows/Troubleshooting.yaml index 8c9da36..9d578fd 100644 --- a/.github/workflows/Troubleshooting.yaml +++ b/.github/workflows/Troubleshooting.yaml @@ -30,7 +30,7 @@ jobs: lfs: true - name: Troubleshooting - uses: microsoft/AL-Go-Actions/Troubleshooting@v5.1 + uses: microsoft/AL-Go-Actions/Troubleshooting@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} diff --git a/.github/workflows/UpdateGitHubGoSystemFiles.yaml b/.github/workflows/UpdateGitHubGoSystemFiles.yaml index 300d839..86a7b0c 100644 --- a/.github/workflows/UpdateGitHubGoSystemFiles.yaml +++ b/.github/workflows/UpdateGitHubGoSystemFiles.yaml @@ -29,11 +29,12 @@ env: jobs: UpdateALGoSystemFiles: + name: 'Update AL-Go System Files' needs: [ ] runs-on: [ windows-latest ] steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2 with: shell: powershell @@ -42,20 +43,20 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2 with: shell: powershell eventId: "DO0098" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: powershell get: templateUrl - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -91,7 +92,7 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "downloadLatest=$downloadLatest" - name: Update AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.1 + uses: microsoft/AL-Go-Actions/CheckForUpdates@v5.2 with: shell: powershell token: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).ghTokenWorkflow }} @@ -102,7 +103,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v5.2 with: shell: powershell eventId: "DO0098" diff --git a/.github/workflows/_BuildALGoProject.yaml b/.github/workflows/_BuildALGoProject.yaml index 33f94f0..c2014f8 100644 --- a/.github/workflows/_BuildALGoProject.yaml +++ b/.github/workflows/_BuildALGoProject.yaml @@ -1,6 +1,6 @@ -name: '_Build AL-GO project' +name: '_Build AL-Go project' -run-name: 'Build project ${{ inputs.project }}' +run-name: 'Build ${{ inputs.project }}' on: workflow_call: @@ -11,7 +11,7 @@ on: default: powershell type: string runsOn: - description: JSON-formatted string og the types of machine to run the build job on + description: JSON-formatted string of the types of machine to run the build job on required: true type: string checkoutRef: @@ -96,7 +96,7 @@ jobs: lfs: true - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v5.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} @@ -105,14 +105,14 @@ jobs: - name: Read secrets id: ReadSecrets if: github.event_name != 'pull_request' - uses: microsoft/AL-Go-Actions/ReadSecrets@v5.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2 with: shell: ${{ inputs.shell }} gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ inputs.secrets }},appDependencyProbingPathsSecrets' - name: Determine ArtifactUrl - uses: microsoft/AL-Go-Actions/DetermineArtifactUrl@v5.1 + uses: microsoft/AL-Go-Actions/DetermineArtifactUrl@v5.2 id: determineArtifactUrl with: shell: ${{ inputs.shell }} @@ -128,7 +128,7 @@ jobs: - name: Download Project Dependencies id: DownloadProjectDependencies - uses: microsoft/AL-Go-Actions/DownloadProjectDependencies@v5.1 + uses: microsoft/AL-Go-Actions/DownloadProjectDependencies@v5.2 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -139,7 +139,7 @@ jobs: baselineWorkflowRunId: ${{ inputs.baselineWorkflowRunId }} - name: Build - uses: microsoft/AL-Go-Actions/RunPipeline@v5.1 + uses: microsoft/AL-Go-Actions/RunPipeline@v5.2 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' BuildMode: ${{ inputs.buildMode }} @@ -155,7 +155,7 @@ jobs: - name: Sign if: inputs.signArtifacts && env.doNotSignApps == 'False' && env.keyVaultCodesignCertificateName != '' id: sign - uses: microsoft/AL-Go-Actions/Sign@v5.1 + uses: microsoft/AL-Go-Actions/Sign@v5.2 with: shell: ${{ needs.Initialization.outputs.githubRunnerShell }} azureCredentialsJson: ${{ secrets.AZURE_CREDENTIALS }} @@ -164,7 +164,7 @@ jobs: - name: Calculate Artifact names id: calculateArtifactsNames - uses: microsoft/AL-Go-Actions/CalculateArtifactNames@v5.1 + uses: microsoft/AL-Go-Actions/CalculateArtifactNames@v5.2 if: success() || failure() with: shell: ${{ inputs.shell }} @@ -258,7 +258,7 @@ jobs: - name: Analyze Test Results id: analyzeTestResults if: (success() || failure()) && env.doNotRunTests == 'False' - uses: microsoft/AL-Go-Actions/AnalyzeTests@v5.1 + uses: microsoft/AL-Go-Actions/AnalyzeTests@v5.2 with: shell: ${{ inputs.shell }} parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} @@ -266,7 +266,7 @@ jobs: - name: Cleanup if: always() - uses: microsoft/AL-Go-Actions/PipelineCleanup@v5.1 + uses: microsoft/AL-Go-Actions/PipelineCleanup@v5.2 with: shell: ${{ inputs.shell }} parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} diff --git a/.github/workflows/_BuildPowerPlatformSolution.yaml b/.github/workflows/_BuildPowerPlatformSolution.yaml new file mode 100644 index 0000000..e5ebbb0 --- /dev/null +++ b/.github/workflows/_BuildPowerPlatformSolution.yaml @@ -0,0 +1,96 @@ +name: '_Build PowerPlatform Solution' + +run-name: 'Build PowerPlatform Solution' + +on: + workflow_call: + inputs: + shell: + description: Shell in which you want to run the action (powershell or pwsh) + required: false + default: powershell + type: string + runsOn: + description: JSON-formatted string of the types of machine to run the build job on + required: true + type: string + checkoutRef: + description: Ref to checkout + required: false + default: ${{ github.ref }} + type: string + project: + description: Name of the built project + required: true + type: string + projectName: + description: Friendly name of the built project + required: true + type: string + publishArtifacts: + description: Flag indicating whether the artifacts should be published + type: boolean + default: false + artifactsNameSuffix: + description: Suffix to add to the artifacts names + required: false + default: '' + type: string + parentTelemetryScopeJson: + description: Specifies the telemetry scope for the telemetry signal + required: false + type: string + +env: + ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} + ALGoRepoSettings: ${{ vars.ALGoRepoSettings }} + +jobs: + Build: + needs: [ ] + runs-on: ${{ fromJson(inputs.runsOn) }} + defaults: + run: + shell: ${{ inputs.shell }} + name: '${{ inputs.projectName }}' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.checkoutRef }} + lfs: true + + - name: Read settings + uses: microsoft/AL-Go-Actions/ReadSettings@v5.2 + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + get: type,powerPlatformSolutionFolder,appRevision,appBuild + + - name: Build + uses: microsoft/AL-Go-Actions/BuildPowerPlatform@v5.2 + with: + shell: ${{ inputs.shell }} + solutionFolder: ${{ inputs.project }} + outputFolder: ${{ inputs.project }}/.buildartifacts/_PowerPlatformSolution/ + outputFileName: ${{ inputs.project }} + appRevision: ${{ env.appRevision }} + appBuild: ${{ env.appBuild }} + + - name: Calculate Artifact names + id: calculateArtifactsNames + uses: microsoft/AL-Go-Actions/CalculateArtifactNames@v5.2 + if: success() || failure() + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + buildMode: 'default' + suffix: ${{ inputs.artifactsNameSuffix }} + + - name: Publish artifacts - Power Platform Solution + uses: actions/upload-artifact@v4 + if: inputs.publishArtifacts + with: + name: ${{ steps.calculateArtifactsNames.outputs.PowerPlatformSolutionArtifactsName }} + path: '${{ inputs.project }}/.buildartifacts/_PowerPlatformSolution/' + if-no-files-found: ignore