diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json index a812aaa..d5c4101 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -26,5 +26,5 @@ "Account": "BCCodeSigningTest", "CertificateProfile": "BCCodeSigningPublic" }, - "templateSha": "384c48472d243099ff7c570c0e7e4d54bfd4637d" + "templateSha": "94d3512cb617d22d7086b61c23a6c826e50163cf" } diff --git a/.github/RELEASENOTES.copy.md b/.github/RELEASENOTES.copy.md index a7d36bd..72c80ca 100644 --- a/.github/RELEASENOTES.copy.md +++ b/.github/RELEASENOTES.copy.md @@ -1,3 +1,144 @@ +## v7.0 + +### Issues + +- Issue 1519 Submitting to AppSource WARNING: AuthContext.Scopes is .. should be +- Issue 1521 Dependencies not installed for multi project incremental PR build +- Issue 1522 Strange warnings in Deploy job post update to AL-Go 6.4 +- BcContainerHelper settings were only read from .github/AL-Go-Settings.json, not allowing global settings in ALGoOrgSettings for TrustedNuGetFeeds, MemoryLimit and other things that should be possible to define globally +- Issue 1526 When updating AL-Go system files, the update process (creating a PR or directly pushing to the branch) fails when there is a file or directory in the repo with the same name as the branch that is to be updated +- Legacy code signing stopped working + +### Page Scripting visualizer + +Page scripting tests have been available for AL-Go for GitHub for a while but required manual inspection of the Page scripting artifact to see the results. It is now possible to get a quick overview in the job summary section of a CICD build, similar to how regular and bcpt test results are displayed. + +No new settings are required. Test results will automatically be displayed if tests are enabled via the existing setting [pageScriptingTests](https://aka.ms/algosettings#pageScriptingTests). + +### Support for deploying to sandbox environments from a pull request + +AL-Go for GitHub now supports deploying from a PR. When using the 'Publish To Environment' workflow, it is now possible to input 'PR_X' as the App version, where 'X' is the PR Id. This will deploy the artifacts from the latest PR build to the chosen environment, if that build is completed and successful. + +All apps, which were not built by the PR build will be deployed from the last known good build. You can find a notification on the PR build explaining which build is used as the last known good build. + +> [!NOTE] +> When deploying a PR build to a sandbox environment, the app will get a special version number, which is: major.minor.maxint.run-number. This means that the sandbox environment likely needs to be deleted after the testing has ended. + +## v6.4 + +### Deprecations + +- `alwaysBuildAllProjects` will be removed after October 1st 2025. Please set the `onPull_Request` property of the `incrementalBuilds` setting to false to force full builds in Pull Requests. +- `Schedule` will be removed after October 1st 2025. The old setting, where the setting key was a combination of the workflow name and `Schedule` (dynamic setting key name) is deprecated. Instead you need to use a setting called [workflowSchedule](https://aka.ms/algosettings#workflowSchedule) and either use [Conditional Settings](https://aka.ms/algosettings#conditional-settings) or place the setting in a workflow specific settings file. + +### Issues + +- Issue 1433 Publish to Environment - DependencyInstallMode not found +- Issue 1440 Create Release fails due to recent changes to the AL-Go +- Issue 1330 CompilerFolder doesn't transfer installed Apps to NuGet resolution +- Issue 1268 Do not throw an un-understandable error during nuGet download +- Performance test sample code in 25.4 contains objects with ID 149201 and 149202, which are not renumbered +- Issue 798 Publish To Environment breaks CI/CD pipelines +- Issue 1182 Runs-on setting type is ambiguous - string or array +- Issue 1502 NuGet dependency version is always LatestMatching + +### New Workflow specific settings + +- `workflowSchedule` - can be structure with a property named `cron`, which must be a valid crontab, defining the CRON schedule for when the specified workflow should run. Default is no scheduled runs, only manual triggers. Build your crontab string here: [https://crontab.guru](https://crontab.guru). You need to run the Update AL-Go System Files workflow for the schedule to take effect.
**Note:** If you configure a WorkflowSchedule for the CI/CD workflow, AL-Go will stop triggering CICDs on push unless you have also added CICDPushBranches to your settings.
**Note also:** If you define a schedule for Update AL-Go System Files, it uses direct Commit instead of creating a PR. +- `workflowConcurrency` - is used to control concurrency of workflows. Like with the `workflowSchedule` setting, this setting should be applied in workflow specific settings files or conditional settings. By default, all workflows allows for concurrency, except for the Create Release workflow. If you are using incremental builds in CI/CD it is also recommented to set WorkflowConcurrency to:
`[ "group: ${{ github.workflow }}-${{ github.ref }}", "cancel-in-progress: true" ]`
in order to cancel prior incremental builds on the same branch.
Read more about workflow concurrency [here](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs). + +### New Repository Settings + +- `nuGetFeedSelectMode` determines the select mode when finding Business Central app packages from NuGet feeds, based on the dependency version specified in app.json. Options are: `Earliest` for earliest version of the package, `EarliestMatching` for earliest version of the package also compatible with the Business Central version used, `Exact` for the exact version of the package, `Latest` for the latest version of the package, `LatestMatching` for the latest version of the package also compatible with the Business Central version used. +- `deployTo` now has two additional properties: + - `includeTestAppsInSandboxEnvironment`, which deploys test apps and their dependencies to the specified sandbox environment if set to `true`. Deployment will fail if used on a Prod environment or if the test app has a dependency on Tests-TestLibraries. Default value is `false`. + - `excludeAppIds`, which is an array of app ids which will be excluded from deployment. Default value is `[]` +- `incrementalBuilds` - is a structure defining how you want AL-Go to handle incremental builds. When using incremental builds for a build, AL-Go will look for the latest successful build, newer than the defined `retentionDays` and only rebuild projects or apps (based on `mode`) which needs to be rebuilt. Properties in the structure includes: + - `onPush` - set this property to **true** in order to enable incremental builds in CI/CD triggered by a merge/push event. Default is **false**. + - `onPull_Request` - set this property to **false** in order to disable incremental builds in Pull Request workflows. Default is **true**. + - `onSchedule` - set this property to **true** in order to enable incremental builds in CI/CD when running on a schedule. Default is **false**. + - `retentionDays` - number of days a successful build is good (and can be used for incremental builds). Default is **30**. + - `mode` - defines the mode for incremental builds. Currently, two values are supported. Use **modifiedProjects** when you want to rebuild all apps in modified projects and depending projects or **modifiedApps** if you only want to rebuild modified apps and depending apps. + +> [!NOTE] +> The projects mentioned here are AL-Go projects in a multi-project repository. A repository can contain multiple projects and a project can contain multiple apps. + +### Run "Update AL-Go System Files" on multiple branches + +_Update AL-Go System Files_ has a new input to specify a list of branches to be updated in a single workflow run. +When running the workflow on a schedule, you can now also specify `includeBranches` in `workflowSchedule` setting, which allows you to update the specified branches. Read more at https://aka.ms/algosettings#workflowSchedule. + +> [!NOTE] +> When running "Update AL-Go System Files" on multiple branches, the template repository URL will be determined based on the branch the workflow runs on and it will be used for all of the specified branches. + +### Support for incremental builds + +AL-Go for GitHub now supports incremental builds, which means that unchanged projects or apps will be reused from the previous good build. Read [this](https://aka.ms/algosettings#incrementalBuilds) to learn more. + +> [!NOTE] +> When using incremental builds it is recommended to also set `workflowConcurrency` as defined [here](https://aka.ms/algosettings#workflowConcurrency). + +### Support for GitHub App authentication + +AL-Go for GitHub now supports using a GitHub App specification as the GhTokenWorkflow secret for a more secure way of allowing repositories to run Update AL-Go System Files and other workflows which are creating commits and pull requests. See [this description](https://github.com/microsoft/AL-Go/blob/main/Scenarios/GhTokenWorkflow.md) to learn how to use GitHub App authentication. + +### Support for embedded secrets in installApps and installTestApps settings + +If your installApps or installTestApps are secure URL, containing a secret token, you can now use a GitHub secret specification as part of or as the full URL of apps to install. An example could be: + +`"installApps": [ "https://www.dropbox.com/${{SECRETNAME}}&dl=1" ]` + +Which would hide the secret part of your URL instead of exposing it in clear text. + +## v6.3 + +### Deprecations + +- `cleanModePreprocessorSymbols` will be removed after April 1st 2025. Use [Conditional Settings](https://aka.ms/algosettings#conditional-settings) instead, specifying buildModes and the `preprocessorSymbols` setting. Read [this](https://aka.ms/algodeprecations#cleanModePreprocessorSymbols) for more information. + +### Issues + +- It is now possible to skip the modification of dependency version numbers when running the Increment Version number workflow or the Create Release workflow + +### New Repository Settings + +- [`shortLivedArtifactsRetentionDays`](https://aka.ms/algosettings#shortLivedArtifactsRetentionDays) determines the number of days to keep short lived build artifacts (f.ex build artifacts from pull request builds, next minor or next major builds). 1 is default. 0 means use GitHub default. +- [`preProcessorSymbols`](https://aka.ms/algosettings#preProcessorSymbols) is a list of preprocessor symbols to use when building the apps. This setting can be specified in [workflow specific settings files](https://aka.ms/algosettings#where-are-the-settings-located) or in [conditional settings](https://aka.ms/algosettings#conditional-settings). + +### New Versioning Strategy + +Setting versioning strategy to 3 will allow 3 segments of the version number to be defined in app.json and repoVersion. Only the 4th segment (Revision) will be defined by the GitHub [run_number](https://go.microsoft.com/fwlink/?linkid=2217416&clcid=0x409) for the CI/CD workflow. Increment version number and Create Release now also supports the ability to set a third segment to the RepoVersion and appversion in app.json. + +### Change in published artifacts + +When using `useProjectDependencies` in a multi-project repository, AL-Go for GitHub used to generate short lived build artifacts called `thisBuild---...`. This is no longer the case. Instead, normal build artifacts will be published and used by depending projects. The retention period for the short lived artifacts generated are controlled by a settings called [`shortLivedArtifactsRetentionDays`](https://aka.ms/algosettings#shortLivedArtifactsRetentionDays). + +### Preprocessor symbols + +It is now possible to define preprocessor symbols, which will be used when building your apps using the [`preProcessorSymbols`](https://aka.ms/algosettings#preProcessorSymbols) setting. This setting can be specified in workflow specific settings file or it can be used in conditional settings. + +## v6.2 + +### Issues + +- Issue 1296 Make property "appFolders" optional +- Issue 1344 Experimental feature "git submodules" seems to be a breaking change +- Issue 1305 Extra telemetry Property RepositoryOwner and RepositoryName¨ +- Add RunnerEnvironment to Telemetry +- Output a notice, not a warning, when there are no available updates for AL-Go for GitHub + +### New Repository Settings + +- `useGitSubmodules` can be either `true` or `recursive` if you want to enable Git Submodules in your repository. If your Git submodules resides in a private repository, you need to create a secret called `gitSubmodulesToken` containing a PAT with access to the submodule repositories. Like with all other secrets, you can also create a setting called `gitSubmodulesTokenSecretName` and specify the name of another secret, with these permissions (f.ex. ghTokenWorkflow). +- `commitOptions` - is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update AL-Go System Files). The structure contains the following properties + - `messageSuffix` : A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to workitems. + - `pullRequestAutoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved. + - `pullRequestLabels` : A list of labels to add to the pull request. The labels need to be created in the repository before they can be applied. + +### Support for Git submodules + +In v6.1 we added experimental support for Git submodules - this did however only work if the submodules was in a public repository. In this version, you can use the `useGitSubmodules` setting to control whether you want to use Git Submodules and the `gitSubmodulesToken` secret to allow permission to read these repositories. + ## v6.1 ### Issues @@ -87,7 +228,7 @@ In the summary after a Test Run, you now also have the result of performance tes ### Support Ubuntu runners for all AL-Go workflows Previously, the workflows "Update AL-Go System Files" and "TroubleShooting" were hardcoded to always run on `windows-latest` to prevent deadlocks and security issues. -From now on, `ubuntu-lates` will also be allowed for these mission critical workflows, when changing the `runs-on` setting. Additionally, only the value `pwsh` for `shell` setting is allowed when using `ubuntu-latest` runners. +From now on, `ubuntu-latest` will also be allowed for these mission critical workflows, when changing the `runs-on` setting. Additionally, only the value `pwsh` for `shell` setting is allowed when using `ubuntu-latest` runners. ### Updated AL-Go telemetry @@ -108,7 +249,7 @@ AL-Go for GitHub now includes a new telemetry module. For detailed information o - **NumberOfSqlStmtsWarning** - a warning is issued if the number of SQL statements from a bcpt test increases more than this percentage (default 5) - **NumberOfSqlStmtsError** - an error is issued if the number of SQL statements from a bcpt test increases more than this percentage (default 10) -> \[!NOTE\] +> [!NOTE] > Duration thresholds are subject to varying results depending on the performance of the agent running the tests. Number of SQL statements executed by a test is often the most reliable indicator of performance degredation. ## v5.2 @@ -135,7 +276,7 @@ AL-Go for GitHub now includes a new telemetry module. For detailed information o - **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\] +> [!NOTE] > PowerPlatform workflows are only available in the PTE template and will be removed if no PowerPlatformSolutionFolder is defined in settings. ### New Scenarios (Documentation) @@ -145,7 +286,7 @@ AL-Go for GitHub now includes a new telemetry module. For detailed information o - [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\] +> [!NOTE] > PowerPlatform functionality are only available in the PTE template. ## v5.1 @@ -283,8 +424,8 @@ AL-Go for GitHub allows you to build and test using insider builds without any e - `enableExternalRulesets`: set this setting to true if you want to allow AL-Go to automatically download external references in rulesets. - `deliverTo`: is not really new, but has new properties and wasn't documented. The complete list of properties is here (note that some properties are deliveryTarget specific): - - **Branches** = an array of branch patterns, which are allowed to deliver to this deliveryTarget. (Default \[ "main" \]) - - **CreateContainerIfNotExist** = *\[Only for DeliverToStorage\]* Create Blob Storage Container if it doesn't already exist. (Default false) + - **Branches** = an array of branch patterns, which are allowed to deliver to this deliveryTarget. (Default [ "main" ]) + - **CreateContainerIfNotExist** = *[Only for DeliverToStorage]* Create Blob Storage Container if it doesn't already exist. (Default false) ### Deployment @@ -325,7 +466,7 @@ Earlier, you could also specify the projects you want to deploy to an environmen - `deployTo`: is not really new, but has new properties. The complete list of properties is here: - **EnvironmentType** = specifies the type of environment. The environment type can be used to invoke a custom deployment. (Default SaaS) - **EnvironmentName** = specifies the "real" name of the environment if it differs from the GitHub environment - - **Branches** = an array of branch patterns, which are allowed to deploy to this environment. (Default \[ "main" \]) + - **Branches** = an array of branch patterns, which are allowed to deploy to this environment. (Default [ "main" ]) - **Projects** = In multi-project repositories, this property can be a comma separated list of project patterns to deploy to this environment. (Default \*) - **SyncMode** = ForceSync if deployment to this environment should happen with ForceSync, else Add. If deploying to the development endpoint you can also specify Development or Clean. (Default Add) - **ContinuousDeployment** = true if this environment should be used for continuous deployment, else false. (Default: AL-Go will continuously deploy to sandbox environments or environments, which doesn't end in (PROD) or (FAT) @@ -383,8 +524,8 @@ Now, you can set the checkbox called Use GhTokenWorkflow to allowing you to use ### New Settings -- `keyVaultCodesignCertificateName`: With this setting you can delegate the codesigning to an Azure Key Vault. This can be useful if your certificate has to be stored in a Hardware Security Module -- `PullRequestTrigger`: With this setting you can set which trigger to use for Pull Request Builds. By default AL-Go will use pull_request_target. +- `keyVaultCodesignCertificateName`: With this setting you can delegate the codesigning to an Azure Key Vault. This can be useful if your certificate has to be stored in a Hardware Security Module +- `PullRequestTrigger`: With this setting you can set which trigger to use for Pull Request Builds. By default AL-Go will use pull_request_target. ### New Actions @@ -580,7 +721,7 @@ In the latest version, we always use LF as line seperator, UTF8 without BOM and ### Experimental Support Setting the repo setting "shell" to "pwsh", followed by running Update AL-Go System Files, will cause all PowerShell code to be run using PowerShell 7 instead of PowerShell 5. This functionality is experimental. Please report any issues at https://github.com/microsoft/AL-Go/issues -Setting the repo setting "runs-on" to "Ubuntu-Latest", followed by running Update AL-Go System Files, will cause all non-build jobs to run using Linux. This functionality is experimental. Please report any issues at https://github.com/microsoft/AL-Go/issues +Setting the repo setting "runs-on" to "Ubuntu-latest", followed by running Update AL-Go System Files, will cause all non-build jobs to run using Linux. This functionality is experimental. Please report any issues at https://github.com/microsoft/AL-Go/issues ## v2.2 diff --git a/.github/workflows/CICD.yaml b/.github/workflows/CICD.yaml index 0f010d8..aa2d6ed 100644 --- a/.github/workflows/CICD.yaml +++ b/.github/workflows/CICD.yaml @@ -39,13 +39,16 @@ jobs: githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} + skippedProjects: ${{ steps.determineProjectsToBuild.outputs.SkippedProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} - powerPlatformSolutionFolder: ${{ steps.DeterminePowerPlatformSolutionFolder.outputs.powerPlatformSolutionFolder }} + baselineWorkflowRunId: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowRunId }} + baselineWorkflowSHA: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowSHA }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} + powerPlatformSolutionFolder: ${{ steps.DeterminePowerPlatformSolutionFolder.outputs.powerPlatformSolutionFolder }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -53,20 +56,36 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: lfs: true - submodules: recursive - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 + with: + shell: pwsh + get: type,powerPlatformSolutionFolder,useGitSubmodules + + - name: Read submodules token + id: ReadSubmodulesToken + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh - get: type, powerPlatformSolutionFolder + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '-gitSubmodulesToken' + + - name: Checkout Submodules + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + lfs: true + submodules: ${{ env.useGitSubmodules }} + token: '${{ fromJson(steps.ReadSubmodulesToken.outputs.Secrets).gitSubmodulesToken }}' - name: Determine Workflow Depth id: DetermineWorkflowDepth @@ -75,7 +94,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v6.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.0 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -88,7 +107,7 @@ jobs: - name: Determine Delivery Target Secrets id: DetermineDeliveryTargetSecrets - uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v6.1 + uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v7.0 with: shell: pwsh projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}' @@ -96,7 +115,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -104,7 +123,7 @@ jobs: - name: Determine Delivery Targets id: DetermineDeliveryTargets - uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v6.1 + uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v7.0 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -114,7 +133,7 @@ jobs: - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v6.1 + uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -130,16 +149,25 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh get: templateUrl + - name: Read secrets + id: ReadSecrets + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 + with: + shell: pwsh + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: 'ghTokenWorkflow' + - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@v6.1 + uses: microsoft/AL-Go-Actions/CheckForUpdates@v7.0 with: shell: pwsh templateUrl: ${{ env.templateUrl }} + token: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).ghTokenWorkflow }} downloadLatest: true Build1: @@ -158,10 +186,11 @@ jobs: project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} + skippedProjectsJson: ${{ needs.Initialization.outputs.skippedProjects }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} + baselineWorkflowRunId: ${{ needs.Initialization.outputs.baselineWorkflowRunId }} + baselineWorkflowSHA: ${{ needs.Initialization.outputs.baselineWorkflowSHA }} secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} - publishArtifacts: ${{ github.ref_name == 'main' || startswith(github.ref_name, 'release/') || startswith(github.ref_name, 'releases/') || needs.Initialization.outputs.deliveryTargetsJson != '[]' || needs.Initialization.outputs.environmentCount > 0 }} signArtifacts: true useArtifactCache: true @@ -181,10 +210,11 @@ jobs: project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} + skippedProjectsJson: ${{ needs.Initialization.outputs.skippedProjects }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} + baselineWorkflowRunId: ${{ needs.Initialization.outputs.baselineWorkflowRunId }} + baselineWorkflowSHA: ${{ needs.Initialization.outputs.baselineWorkflowSHA }} secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} - publishArtifacts: ${{ github.ref_name == 'main' || startswith(github.ref_name, 'release/') || startswith(github.ref_name, 'releases/') || needs.Initialization.outputs.deliveryTargetsJson != '[]' || needs.Initialization.outputs.environmentCount > 0 }} signArtifacts: true useArtifactCache: true @@ -206,12 +236,12 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Download artifacts - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh @@ -220,7 +250,7 @@ jobs: uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - name: Build Reference Documentation - uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v6.1 + uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v7.0 with: shell: pwsh artifacts: '.artifacts' @@ -252,12 +282,12 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Download artifacts - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: ${{ matrix.shell }} get: type,powerPlatformSolutionFolder @@ -271,7 +301,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: ${{ matrix.shell }} gitHubSecrets: ${{ toJson(secrets) }} @@ -279,7 +309,7 @@ jobs: - name: Deploy to Business Central id: Deploy - uses: microsoft/AL-Go-Actions/Deploy@v6.1 + uses: microsoft/AL-Go-Actions/Deploy@v7.0 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -291,7 +321,7 @@ jobs: - name: Deploy to Power Platform if: env.type == 'PTE' && env.powerPlatformSolutionFolder != '' - uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v6.1 + uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v7.0 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -314,25 +344,25 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Download artifacts - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ matrix.deliveryTarget }}Context' - name: Deliver - uses: microsoft/AL-Go-Actions/Deliver@v6.1 + uses: microsoft/AL-Go-Actions/Deliver@v7.0 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -352,7 +382,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml index 5a235fd..1231f53 100644 --- a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml +++ b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml @@ -50,7 +50,7 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -59,19 +59,19 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -90,7 +90,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/v6.1/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -112,13 +112,13 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -137,7 +137,7 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -value "adminCenterApiCredentials=$adminCenterApiCredentials" - name: Create Development Environment - uses: microsoft/AL-Go-Actions/CreateDevelopmentEnvironment@v6.1 + uses: microsoft/AL-Go-Actions/CreateDevelopmentEnvironment@v7.0 with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -149,7 +149,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/CreateRelease.yaml b/.github/workflows/CreateRelease.yaml index 164ca76..b7a384d 100644 --- a/.github/workflows/CreateRelease.yaml +++ b/.github/workflows/CreateRelease.yaml @@ -1,6 +1,9 @@ name: ' Create release' run-name: "Create release - Version ${{ inputs.tag }}" +concurrency: + group: ${{ github.workflow }} + on: workflow_dispatch: inputs: @@ -16,14 +19,14 @@ on: description: Tag of this release (needs to be semantic version string https://semver.org, ex. 1.0.0) required: true default: '' - prerelease: - description: Prerelease? - type: boolean - default: false - draft: - description: Draft? - type: boolean - default: false + releaseType: + description: Release, prerelease or draft? + type: choice + options: + - Release + - Prerelease + - Draft + default: Release createReleaseBranch: description: Create Release Branch? type: boolean @@ -33,9 +36,13 @@ on: type: string default: release/ updateVersionNumber: - description: New Version Number in main branch. Use Major.Minor for absolute change, use +Major.Minor for incremental change. + description: New Version Number in main branch. Use Major.Minor (optionally add .Build for versioningstrategy 3) for absolute change, or +1, +0.1 (or +0.0.1 for versioningstrategy 3) incremental change. required: false default: '' + skipUpdatingDependencies: + description: Skip updating dependency version numbers in all apps. + type: boolean + default: false directCommit: description: Direct Commit? type: boolean @@ -51,8 +58,6 @@ permissions: id-token: write pull-requests: write -concurrency: release - defaults: run: shell: pwsh @@ -73,7 +78,7 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -82,37 +87,38 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh get: templateUrl,repoName,type,powerPlatformSolutionFolder - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} - getSecrets: 'TokenForPush' + getSecrets: 'TokenForPush,ghTokenWorkflow' useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Determine Projects id: determineProjects - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v6.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.0 with: shell: pwsh - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@v6.1 + uses: microsoft/AL-Go-Actions/CheckForUpdates@v7.0 with: shell: pwsh templateUrl: ${{ env.templateUrl }} + token: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).ghTokenWorkflow }} downloadLatest: true - name: Analyze Artifacts @@ -159,7 +165,7 @@ jobs: $appVersion = "$env:_appVersion" if ($appVersion -eq "latest") { Write-Host "Grab latest" - $artifact = $allArtifacts | Where-Object { $_.name -like "$project-$refname-Apps-*" -or $_.name -like "$project-$refname-PowerPlatformSolution-*" } | 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 or $project-$refname-PowerPlatformSolution-$appVersion" @@ -183,7 +189,7 @@ jobs: $sha = $artifact.workflow_run.head_sha } - write-host "looking for $project-$refname-Apps-$artifactsVersion or $project-$refname-TestApps-$artifactsVersion or $project-$refname-Dependencies-$artifactsVersion or $project-$refname-PowerPlatformSolution-$artifactsVersion" + 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) @@ -203,7 +209,7 @@ jobs: - name: Prepare release notes id: createreleasenotes - uses: microsoft/AL-Go-Actions/CreateReleaseNotes@v6.1 + uses: microsoft/AL-Go-Actions/CreateReleaseNotes@v7.0 with: shell: pwsh tag_name: ${{ github.event.inputs.tag }} @@ -224,8 +230,8 @@ jobs: tag_name: '${{ github.event.inputs.tag }}', name: '${{ github.event.inputs.name }}', body: bodyMD.replaceAll('\\n','\n').replaceAll('%0A','\n').replaceAll('%0D','\n').replaceAll('%25','%'), - draft: ${{ github.event.inputs.draft=='true' }}, - prerelease: ${{ github.event.inputs.prerelease=='true' }}, + draft: ${{ github.event.inputs.releaseType=='Draft' }}, + prerelease: ${{ github.event.inputs.releaseType=='Prerelease' }}, make_latest: 'legacy', target_commitish: '${{ steps.analyzeartifacts.outputs.commitish }}' }); @@ -245,13 +251,13 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -289,7 +295,7 @@ jobs: }); - name: Deliver to NuGet - uses: microsoft/AL-Go-Actions/Deliver@v6.1 + uses: microsoft/AL-Go-Actions/Deliver@v7.0 if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).nuGetContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -302,7 +308,7 @@ jobs: atypes: 'Apps,TestApps' - name: Deliver to Storage - uses: microsoft/AL-Go-Actions/Deliver@v6.1 + uses: microsoft/AL-Go-Actions/Deliver@v7.0 if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).storageContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -346,13 +352,13 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -360,11 +366,12 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Update Version Number - uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v6.1 + uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v7.0 with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} versionNumber: ${{ github.event.inputs.updateVersionNumber }} + skipUpdatingDependencies: ${{ github.event.inputs.skipUpdatingDependencies }} directCommit: ${{ github.event.inputs.directCommit }} PostProcess: @@ -377,7 +384,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/Current.yaml b/.github/workflows/Current.yaml index 282e2ff..381fdf2 100644 --- a/.github/workflows/Current.yaml +++ b/.github/workflows/Current.yaml @@ -28,10 +28,11 @@ jobs: projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} + artifactsRetentionDays: ${{ steps.DetermineWorkflowDepth.outputs.ArtifactsRetentionDays }} telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -39,28 +40,46 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: lfs: true - submodules: recursive - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh + get: useGitSubmodules,shortLivedArtifactsRetentionDays + + - name: Read submodules token + id: ReadSubmodulesToken + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 + with: + shell: pwsh + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '-gitSubmodulesToken' + + - name: Checkout Submodules + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + lfs: true + submodules: ${{ env.useGitSubmodules }} + token: '${{ fromJson(steps.ReadSubmodulesToken.outputs.Secrets).gitSubmodulesToken }}' - name: Determine Workflow Depth id: DetermineWorkflowDepth run: | Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ArtifactsRetentionDays=$($env:shortLivedArtifactsRetentionDays)" - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v6.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.0 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -83,7 +102,7 @@ jobs: buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} + artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'Current' Build: @@ -104,7 +123,7 @@ jobs: buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} + artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'Current' PostProcess: @@ -117,7 +136,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/DeployReferenceDocumentation.yaml b/.github/workflows/DeployReferenceDocumentation.yaml index 29fad24..0399ffe 100644 --- a/.github/workflows/DeployReferenceDocumentation.yaml +++ b/.github/workflows/DeployReferenceDocumentation.yaml @@ -30,18 +30,18 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v6.1 + uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -54,7 +54,7 @@ jobs: uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - name: Build Reference Documentation - uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v6.1 + uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v7.0 with: shell: pwsh artifacts: 'latest' @@ -71,7 +71,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/IncrementVersionNumber.yaml b/.github/workflows/IncrementVersionNumber.yaml index 80c55a7..88a6d8a 100644 --- a/.github/workflows/IncrementVersionNumber.yaml +++ b/.github/workflows/IncrementVersionNumber.yaml @@ -10,8 +10,13 @@ on: required: false default: '*' versionNumber: - description: Updated Version Number. Use Major.Minor for absolute change, use +Major.Minor for incremental change. - required: true + description: New Version Number in main branch. Use Major.Minor (optionally add .Build for versioningstrategy 3) for absolute change, or +1, +0.1 (or +0.0.1 for versioningstrategy 3) incremental change. + required: false + default: '' + skipUpdatingDependencies: + description: Skip updating dependency version numbers in all apps. + type: boolean + default: false directCommit: description: Direct Commit? type: boolean @@ -21,12 +26,6 @@ on: type: boolean default: false -permissions: - actions: read - contents: write - id-token: write - pull-requests: write - defaults: run: shell: pwsh @@ -39,9 +38,14 @@ jobs: IncrementVersionNumber: needs: [ ] runs-on: [ ubuntu-latest ] + permissions: + actions: read + contents: write + id-token: write + pull-requests: write steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -50,18 +54,18 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -69,17 +73,18 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Increment Version Number - uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v6.1 + uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v7.0 with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} projects: ${{ github.event.inputs.projects }} versionNumber: ${{ github.event.inputs.versionNumber }} + skipUpdatingDependencies: ${{ github.event.inputs.skipUpdatingDependencies }} directCommit: ${{ github.event.inputs.directCommit }} - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/NextMajor.yaml b/.github/workflows/NextMajor.yaml index f017e25..a4ecb8b 100644 --- a/.github/workflows/NextMajor.yaml +++ b/.github/workflows/NextMajor.yaml @@ -28,10 +28,11 @@ jobs: projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} + artifactsRetentionDays: ${{ steps.DetermineWorkflowDepth.outputs.ArtifactsRetentionDays }} telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -39,28 +40,46 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: lfs: true - submodules: recursive - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh + get: useGitSubmodules,shortLivedArtifactsRetentionDays + + - name: Read submodules token + id: ReadSubmodulesToken + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 + with: + shell: pwsh + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '-gitSubmodulesToken' + + - name: Checkout Submodules + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + lfs: true + submodules: ${{ env.useGitSubmodules }} + token: '${{ fromJson(steps.ReadSubmodulesToken.outputs.Secrets).gitSubmodulesToken }}' - name: Determine Workflow Depth id: DetermineWorkflowDepth run: | Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ArtifactsRetentionDays=$($env:shortLivedArtifactsRetentionDays)" - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v6.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.0 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -83,7 +102,7 @@ jobs: buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} + artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'NextMajor' Build: @@ -104,7 +123,7 @@ jobs: buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} + artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'NextMajor' PostProcess: @@ -117,7 +136,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/NextMinor.yaml b/.github/workflows/NextMinor.yaml index dbc1f96..439351f 100644 --- a/.github/workflows/NextMinor.yaml +++ b/.github/workflows/NextMinor.yaml @@ -28,10 +28,11 @@ jobs: projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} + artifactsRetentionDays: ${{ steps.DetermineWorkflowDepth.outputs.ArtifactsRetentionDays }} telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -39,28 +40,46 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: lfs: true - submodules: recursive - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh + get: useGitSubmodules,shortLivedArtifactsRetentionDays + + - name: Read submodules token + id: ReadSubmodulesToken + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 + with: + shell: pwsh + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '-gitSubmodulesToken' + + - name: Checkout Submodules + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + lfs: true + submodules: ${{ env.useGitSubmodules }} + token: '${{ fromJson(steps.ReadSubmodulesToken.outputs.Secrets).gitSubmodulesToken }}' - name: Determine Workflow Depth id: DetermineWorkflowDepth run: | Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ArtifactsRetentionDays=$($env:shortLivedArtifactsRetentionDays)" - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v6.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.0 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -83,7 +102,7 @@ jobs: buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} + artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'NextMinor' Build: @@ -104,7 +123,7 @@ jobs: buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} + artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'NextMinor' PostProcess: @@ -117,7 +136,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PublishToAppSource.yaml b/.github/workflows/PublishToAppSource.yaml index 5bae558..859b814 100644 --- a/.github/workflows/PublishToAppSource.yaml +++ b/.github/workflows/PublishToAppSource.yaml @@ -38,7 +38,7 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -47,7 +47,7 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh @@ -60,20 +60,20 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: 'appSourceContext' - name: Deliver - uses: microsoft/AL-Go-Actions/Deliver@v6.1 + uses: microsoft/AL-Go-Actions/Deliver@v7.0 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -94,7 +94,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PublishToEnvironment.yaml b/.github/workflows/PublishToEnvironment.yaml index 8fe697a..f33fd8f 100644 --- a/.github/workflows/PublishToEnvironment.yaml +++ b/.github/workflows/PublishToEnvironment.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: appVersion: - description: App version to deploy to environment(s) (current, prerelease, draft, latest or version number) + description: App version to deploy to environment(s) (current, prerelease, draft, latest, version number or PR_) required: false default: 'current' environmentName: @@ -36,7 +36,7 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -45,19 +45,19 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v6.1 + uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -75,7 +75,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 if: steps.DetermineDeploymentEnvironments.outputs.UnknownEnvironment == 1 with: shell: pwsh @@ -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/v6.1/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -141,21 +141,21 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "envName=$envName" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: ${{ matrix.shell }} get: type,powerPlatformSolutionFolder - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: ${{ matrix.shell }} gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext' - name: Get Artifacts for deployment - uses: microsoft/AL-Go-Actions/GetArtifactsForDeployment@v6.1 + uses: microsoft/AL-Go-Actions/GetArtifactsForDeployment@v7.0 with: shell: ${{ matrix.shell }} artifactsVersion: ${{ github.event.inputs.appVersion }} @@ -163,7 +163,7 @@ jobs: - name: Deploy to Business Central id: Deploy - uses: microsoft/AL-Go-Actions/Deploy@v6.1 + uses: microsoft/AL-Go-Actions/Deploy@v7.0 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -172,10 +172,11 @@ jobs: artifactsFolder: '.artifacts' type: 'Publish' deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }} + artifactsVersion: ${{ github.event.inputs.appVersion }} - name: Deploy to Power Platform if: env.type == 'PTE' && env.powerPlatformSolutionFolder != '' - uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v6.1 + uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v7.0 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -194,7 +195,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PullRequestHandler.yaml b/.github/workflows/PullRequestHandler.yaml index 69d9c70..2c07953 100644 --- a/.github/workflows/PullRequestHandler.yaml +++ b/.github/workflows/PullRequestHandler.yaml @@ -28,7 +28,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@v6.1 + - uses: microsoft/AL-Go-Actions/VerifyPRChanges@v7.0 Initialization: needs: [ PregateCheck ] @@ -39,11 +39,13 @@ jobs: projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} baselineWorkflowRunId: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowRunId }} + baselineWorkflowSHA: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowSHA }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} + artifactsRetentionDays: ${{ steps.DetermineWorkflowDepth.outputs.ArtifactsRetentionDays }} telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh @@ -55,24 +57,26 @@ jobs: - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh + get: shortLivedArtifactsRetentionDays - name: Determine Workflow Depth id: DetermineWorkflowDepth run: | Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ArtifactsRetentionDays=$($env:shortLivedArtifactsRetentionDays)" - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v6.1 + uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.0 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -96,9 +100,11 @@ jobs: buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} baselineWorkflowRunId: ${{ needs.Initialization.outputs.baselineWorkflowRunId }} + baselineWorkflowSHA: ${{ needs.Initialization.outputs.baselineWorkflowSHA }} secrets: 'licenseFileUrl,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} + artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'PR${{ github.event.number }}' + useArtifactCache: true Build: needs: [ Initialization, Build1 ] @@ -119,9 +125,11 @@ jobs: buildMode: ${{ matrix.buildMode }} projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} baselineWorkflowRunId: ${{ needs.Initialization.outputs.baselineWorkflowRunId }} + baselineWorkflowSHA: ${{ needs.Initialization.outputs.baselineWorkflowSHA }} secrets: 'licenseFileUrl,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' - publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} + artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'PR${{ github.event.number }}' + useArtifactCache: true StatusCheck: needs: [ Initialization, Build ] @@ -131,7 +139,7 @@ jobs: steps: - name: Pull Request Status Check id: PullRequestStatusCheck - uses: microsoft/AL-Go-Actions/PullRequestStatusCheck@v6.1 + uses: microsoft/AL-Go-Actions/PullRequestStatusCheck@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -139,7 +147,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 if: success() || failure() env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/Troubleshooting.yaml b/.github/workflows/Troubleshooting.yaml index 84d6c75..222a7c6 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@v6.1 + uses: microsoft/AL-Go-Actions/Troubleshooting@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} diff --git a/.github/workflows/UpdateGitHubGoSystemFiles.yaml b/.github/workflows/UpdateGitHubGoSystemFiles.yaml index 33bf892..f8e4b15 100644 --- a/.github/workflows/UpdateGitHubGoSystemFiles.yaml +++ b/.github/workflows/UpdateGitHubGoSystemFiles.yaml @@ -15,6 +15,10 @@ on: description: Direct Commit? type: boolean default: false + includeBranches: + description: Specify a comma-separated list of branches to update. Wildcards are supported. The AL-Go settings will be read for every branch. Leave empty to update the current branch only. + required: false + default: '' permissions: actions: read @@ -30,81 +34,117 @@ env: ALGoRepoSettings: ${{ vars.ALGoRepoSettings }} jobs: + Initialize: + runs-on: windows-latest + name: Initialize + outputs: + UpdateBranches: ${{ steps.GetBranches.outputs.Result }} + TemplateUrl: ${{ steps.DetermineTemplateUrl.outputs.TemplateUrl }} + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Read settings + id: ReadSettings + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 + with: + shell: pwsh + get: templateUrl + + - name: Get Workflow Multi-Run Branches + id: GetBranches + uses: microsoft/AL-Go-Actions/GetWorkflowMultiRunBranches@v7.0 + with: + shell: pwsh + includeBranches: ${{ github.event.inputs.includeBranches }} + + - name: Determine Template URL + id: DetermineTemplateUrl + env: + TemplateUrlAsInput: '${{ github.event.inputs.templateUrl }}' + run: | + $templateUrl = $env:templateUrl # Available from ReadSettings step + if ($ENV:TemplateUrlAsInput) { + # Use the input value if it is provided + $templateUrl = $ENV:TemplateUrlAsInput + } + Write-Host "Using template URL: $templateUrl" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "TemplateUrl=$templateUrl" + UpdateALGoSystemFiles: - name: 'Update AL-Go System Files' - needs: [ ] + name: "[${{ matrix.branch }}] Update AL-Go System Files" + needs: [ Initialize ] runs-on: [ ubuntu-latest ] + strategy: + matrix: + branch: ${{ fromJson(needs.Initialize.outputs.UpdateBranches).branches }} + fail-fast: false + steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.1 + uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.0 with: shell: pwsh - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: ${{ matrix.branch }} - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.0 with: shell: pwsh - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: pwsh - get: templateUrl + get: commitOptions - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: 'ghTokenWorkflow' - - name: Override templateUrl - env: - templateUrl: ${{ github.event.inputs.templateUrl }} - run: | - $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - $templateUrl = $ENV:templateUrl - if ($templateUrl) { - Write-Host "Using Template Url: $templateUrl" - Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "templateUrl=$templateUrl" - } - - - name: Calculate Input + - name: Calculate Commit Options env: directCommit: '${{ github.event.inputs.directCommit }}' - downloadLatest: ${{ github.event.inputs.downloadLatest }} - eventName: ${{ github.event_name }} + downloadLatest: '${{ github.event.inputs.downloadLatest }}' run: | $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - $directCommit = $ENV:directCommit - $downloadLatest = $ENV:downloadLatest - Write-Host $ENV:eventName - if ($ENV:eventName -eq 'schedule') { - Write-Host "Running Update AL-Go System Files on a schedule. Setting DirectCommit and DownloadLatest to true" - $directCommit = 'true' - $downloadLatest = 'true' + if('${{ github.event_name }}' -eq 'workflow_dispatch') { + Write-Host "Using inputs from workflow_dispatch event" + $directCommit = $env:directCommit + $downloadLatest = $env:downloadLatest + } + else { + Write-Host "Using inputs from commitOptions setting" + $commitOptions = $env:commitOptions | ConvertFrom-Json # Available from ReadSettings step + $directCommit=$(-not $commitOptions.createPullRequest) + $downloadLatest=$true } Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "directCommit=$directCommit" Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "downloadLatest=$downloadLatest" - name: Update AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@v6.1 + uses: microsoft/AL-Go-Actions/CheckForUpdates@v7.0 with: shell: pwsh token: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).ghTokenWorkflow }} downloadLatest: ${{ env.downloadLatest }} update: 'Y' - templateUrl: ${{ env.templateUrl }} + templateUrl: ${{ needs.Initialize.outputs.TemplateUrl }} directCommit: ${{ env.directCommit }} + updateBranch: ${{ matrix.branch }} - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.1 + uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.0 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/_BuildALGoProject.yaml b/.github/workflows/_BuildALGoProject.yaml index 8aec2e8..d95fd30 100644 --- a/.github/workflows/_BuildALGoProject.yaml +++ b/.github/workflows/_BuildALGoProject.yaml @@ -27,6 +27,11 @@ on: description: Friendly name of the built project required: true type: string + skippedProjectsJson: + description: An array of AL-Go projects to skip in compressed JSON format + required: false + default: '[]' + type: string projectDependenciesJson: description: Dependencies of the built project in compressed Json format required: false @@ -41,19 +46,20 @@ on: required: false default: '0' type: string + baselineWorkflowSHA: + description: SHA of the baseline workflow run + required: false + default: '' + type: string secrets: description: A comma-separated string with the names of the secrets, required for the workflow. required: false default: '' type: string - publishThisBuildArtifacts: - description: Flag indicating whether this build artifacts should be published - type: boolean - default: false - publishArtifacts: - description: Flag indicating whether the artifacts should be published - type: boolean - default: false + artifactsRetentionDays: + description: Number of days to keep the artifacts + type: number + default: 0 artifactsNameSuffix: description: Suffix to add to the artifacts names required: false @@ -91,52 +97,73 @@ jobs: with: ref: ${{ inputs.checkoutRef }} lfs: true - submodules: recursive - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v6.1 + uses: microsoft/AL-Go-Actions/ReadSettings@v7.0 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} - get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,doNotRunTests,artifact,generateDependencyArtifact,trustedSigning + buildMode: ${{ inputs.buildMode }} + get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,doNotRunTests,doNotRunBcptTests,doNotRunpageScriptingTests,artifact,generateDependencyArtifact,trustedSigning,useGitSubmodules + + - name: Determine whether to build project + id: DetermineBuildProject + uses: microsoft/AL-Go-Actions/DetermineBuildProject@v7.0 + with: + shell: ${{ inputs.shell }} + skippedProjectsJson: ${{ inputs.skippedProjectsJson }} + project: ${{ inputs.project }} + baselineWorkflowRunId: ${{ inputs.baselineWorkflowRunId }} - name: Read secrets id: ReadSecrets - if: github.event_name != 'pull_request' - uses: microsoft/AL-Go-Actions/ReadSecrets@v6.1 + if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && github.event_name != 'pull_request' + uses: microsoft/AL-Go-Actions/ReadSecrets@v7.0 with: shell: ${{ inputs.shell }} gitHubSecrets: ${{ toJson(secrets) }} - getSecrets: '${{ inputs.secrets }},appDependencySecrets,AZURE_CREDENTIALS' + getSecrets: '${{ inputs.secrets }},appDependencySecrets,AZURE_CREDENTIALS,-gitSubmodulesToken' + + - name: Checkout Submodules + if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: ${{ inputs.checkoutRef }} + lfs: true + submodules: ${{ env.useGitSubmodules }} + token: '${{ fromJson(steps.ReadSecrets.outputs.Secrets).gitSubmodulesToken }}' - name: Determine ArtifactUrl - uses: microsoft/AL-Go-Actions/DetermineArtifactUrl@v6.1 id: determineArtifactUrl + if: steps.DetermineBuildProject.outputs.BuildIt == 'True' + uses: microsoft/AL-Go-Actions/DetermineArtifactUrl@v7.0 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} - name: Cache Business Central Artifacts - if: env.useCompilerFolder == 'True' && inputs.useArtifactCache && env.artifactCacheKey - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && env.useCompilerFolder == 'True' && inputs.useArtifactCache && env.artifactCacheKey + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: .artifactcache key: ${{ env.artifactCacheKey }} - name: Download Project Dependencies id: DownloadProjectDependencies - uses: microsoft/AL-Go-Actions/DownloadProjectDependencies@v6.1 + if: steps.DetermineBuildProject.outputs.BuildIt == 'True' + uses: microsoft/AL-Go-Actions/DownloadProjectDependencies@v7.0 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} buildMode: ${{ inputs.buildMode }} - projectsDependenciesJson: ${{ inputs.projectDependenciesJson }} + projectDependenciesJson: ${{ inputs.projectDependenciesJson }} baselineWorkflowRunId: ${{ inputs.baselineWorkflowRunId }} - name: Build - uses: microsoft/AL-Go-Actions/RunPipeline@v6.1 + uses: microsoft/AL-Go-Actions/RunPipeline@v7.0 + if: steps.DetermineBuildProject.outputs.BuildIt == 'True' env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' BuildMode: ${{ inputs.buildMode }} @@ -147,11 +174,13 @@ jobs: buildMode: ${{ inputs.buildMode }} installAppsJson: ${{ steps.DownloadProjectDependencies.outputs.DownloadedApps }} installTestAppsJson: ${{ steps.DownloadProjectDependencies.outputs.DownloadedTestApps }} + baselineWorkflowRunId: ${{ inputs.baselineWorkflowRunId }} + baselineWorkflowSHA: ${{ inputs.baselineWorkflowSHA }} - name: Sign - if: inputs.signArtifacts && env.doNotSignApps == 'False' && (env.keyVaultCodesignCertificateName != '' || (fromJson(env.trustedSigning).Endpoint != '' && fromJson(env.trustedSigning).Account != '' && fromJson(env.trustedSigning).CertificateProfile != '')) id: sign - uses: microsoft/AL-Go-Actions/Sign@v6.1 + if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && inputs.signArtifacts && env.doNotSignApps == 'False' && (env.keyVaultCodesignCertificateName != '' || (fromJson(env.trustedSigning).Endpoint != '' && fromJson(env.trustedSigning).Account != '' && fromJson(env.trustedSigning).CertificateProfile != '')) + uses: microsoft/AL-Go-Actions/Sign@v7.0 with: shell: ${{ inputs.shell }} azureCredentialsJson: '${{ fromJson(steps.ReadSecrets.outputs.Secrets).AZURE_CREDENTIALS }}' @@ -159,7 +188,7 @@ jobs: - name: Calculate Artifact names id: calculateArtifactsNames - uses: microsoft/AL-Go-Actions/CalculateArtifactNames@v6.1 + uses: microsoft/AL-Go-Actions/CalculateArtifactNames@v7.0 if: success() || failure() with: shell: ${{ inputs.shell }} @@ -167,59 +196,35 @@ jobs: buildMode: ${{ inputs.buildMode }} suffix: ${{ inputs.artifactsNameSuffix }} - - name: Upload thisbuild artifacts - apps - if: inputs.publishThisBuildArtifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - with: - name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildAppsArtifactsName }} - path: '${{ inputs.project }}/.buildartifacts/Apps/' - if-no-files-found: ignore - retention-days: 1 - - - name: Upload thisbuild artifacts - dependencies - if: inputs.publishThisBuildArtifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - with: - name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildDependenciesArtifactsName }} - path: '${{ inputs.project }}/.buildartifacts/Dependencies/' - if-no-files-found: ignore - retention-days: 1 - - - name: Upload thisbuild artifacts - test apps - if: inputs.publishThisBuildArtifacts - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - with: - name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildTestAppsArtifactsName }} - path: '${{ inputs.project }}/.buildartifacts/TestApps/' - if-no-files-found: ignore - retention-days: 1 - - name: Publish artifacts - apps - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - if: inputs.publishArtifacts + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: inputs.artifactsRetentionDays >= 0 && (hashFiles(format('{0}/.buildartifacts/Apps/*',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.AppsArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/Apps/' if-no-files-found: ignore + retention-days: ${{ inputs.artifactsRetentionDays }} - name: Publish artifacts - dependencies - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - if: inputs.publishArtifacts && env.generateDependencyArtifact == 'True' + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: inputs.artifactsRetentionDays >= 0 && env.generateDependencyArtifact == 'True' && (hashFiles(format('{0}/.buildartifacts/Dependencies/*',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.DependenciesArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/Dependencies/' if-no-files-found: ignore + retention-days: ${{ inputs.artifactsRetentionDays }} - name: Publish artifacts - test apps - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - if: inputs.publishArtifacts + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: inputs.artifactsRetentionDays >= 0 && (hashFiles(format('{0}/.buildartifacts/TestApps/*',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.TestAppsArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/TestApps/' if-no-files-found: ignore + retention-days: ${{ inputs.artifactsRetentionDays }} - name: Publish artifacts - build output - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 if: (success() || failure()) && (hashFiles(format('{0}/BuildOutput.txt',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.BuildOutputArtifactsName }} @@ -227,7 +232,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - container event log - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 if: (failure()) && (hashFiles(format('{0}/ContainerEventLog.evtx',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.ContainerEventLogArtifactsName }} @@ -235,7 +240,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - test results - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/TestResults.xml',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.TestResultsArtifactsName }} @@ -243,7 +248,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - bcpt test results - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/bcptTestResults.json',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.BcptTestResultsArtifactsName }} @@ -251,7 +256,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - page scripting test results - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/PageScriptingTestResults.xml',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.PageScriptingTestResultsArtifactsName }} @@ -259,8 +264,8 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - page scripting test result details - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - if: (success() || failure()) + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/PageScriptingTestResultDetails/*',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.PageScriptingTestResultDetailsArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/PageScriptingTestResultDetails/' @@ -268,15 +273,34 @@ jobs: - name: Analyze Test Results id: analyzeTestResults - if: (success() || failure()) && env.doNotRunTests == 'False' - uses: microsoft/AL-Go-Actions/AnalyzeTests@v6.1 + if: (success() || failure()) && env.doNotRunTests == 'False' && ((hashFiles(format('{0}/.buildartifacts/TestResults.xml',inputs.project)) != '') || (hashFiles(format('{0}/.buildartifacts/bcptTestResults.json',inputs.project)) != '')) + uses: microsoft/AL-Go-Actions/AnalyzeTests@v7.0 + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + testType: "normal" + + - name: Analyze BCPT Test Results + id: analyzeTestResultsBCPT + if: (success() || failure()) && env.doNotRunBcptTests == 'False' + uses: microsoft/AL-Go-Actions/AnalyzeTests@v7.0 + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + testType: "bcpt" + + - name: Analyze Page Scripting Test Results + id: analyzeTestResultsPageScripting + if: (success() || failure()) && env.doNotRunpageScriptingTests == 'False' + uses: microsoft/AL-Go-Actions/AnalyzeTests@v7.0 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} + testType: "pageScripting" - name: Cleanup - if: always() - uses: microsoft/AL-Go-Actions/PipelineCleanup@v6.1 + if: always() && steps.DetermineBuildProject.outputs.BuildIt == 'True' + uses: microsoft/AL-Go-Actions/PipelineCleanup@v7.0 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} diff --git a/Library Apps/.AL-Go/cloudDevEnv.ps1 b/Library Apps/.AL-Go/cloudDevEnv.ps1 index 1afe609..4e472dd 100644 --- a/Library Apps/.AL-Go/cloudDevEnv.ps1 +++ b/Library Apps/.AL-Go/cloudDevEnv.ps1 @@ -42,9 +42,9 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/Github-Helper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/Packages.json' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/Github-Helper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/Packages.json' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/Library Apps/.AL-Go/localDevEnv.ps1 b/Library Apps/.AL-Go/localDevEnv.ps1 index 358732d..796388f 100644 --- a/Library Apps/.AL-Go/localDevEnv.ps1 +++ b/Library Apps/.AL-Go/localDevEnv.ps1 @@ -46,9 +46,9 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/Github-Helper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/Packages.json' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/Github-Helper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/Packages.json' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/Main App/.AL-Go/cloudDevEnv.ps1 b/Main App/.AL-Go/cloudDevEnv.ps1 index 1afe609..4e472dd 100644 --- a/Main App/.AL-Go/cloudDevEnv.ps1 +++ b/Main App/.AL-Go/cloudDevEnv.ps1 @@ -42,9 +42,9 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/Github-Helper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/Packages.json' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/Github-Helper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/Packages.json' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath . $ALGoHelperPath -local diff --git a/Main App/.AL-Go/localDevEnv.ps1 b/Main App/.AL-Go/localDevEnv.ps1 index 358732d..796388f 100644 --- a/Main App/.AL-Go/localDevEnv.ps1 +++ b/Main App/.AL-Go/localDevEnv.ps1 @@ -46,9 +46,9 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/Github-Helper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v6.1/Packages.json' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/Github-Helper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.0/Packages.json' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath . $ALGoHelperPath -local