diff --git a/.AL-Go/cloudDevEnv.ps1 b/.AL-Go/cloudDevEnv.ps1 index 9c5db0c..7cba9e4 100644 --- a/.AL-Go/cloudDevEnv.ps1 +++ b/.AL-Go/cloudDevEnv.ps1 @@ -27,11 +27,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/freddydk/AL-Go/CheckForUpdates/Actions/Github-Helper.psm1' +$GitHubHelperUrl = 'https://raw.githubusercontent.com/freddydk/AL-Go/nuget/Actions/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/freddydk/AL-Go/CheckForUpdates/Actions/AL-Go-Helper.ps1' +$ALGoHelperUrl = 'https://raw.githubusercontent.com/freddydk/AL-Go/nuget/Actions/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 3f3b725..887b97e 100644 --- a/.AL-Go/localDevEnv.ps1 +++ b/.AL-Go/localDevEnv.ps1 @@ -30,11 +30,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/freddydk/AL-Go/CheckForUpdates/Actions/Github-Helper.psm1' +$GitHubHelperUrl = 'https://raw.githubusercontent.com/freddydk/AL-Go/nuget/Actions/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/freddydk/AL-Go/CheckForUpdates/Actions/AL-Go-Helper.ps1' +$ALGoHelperUrl = 'https://raw.githubusercontent.com/freddydk/AL-Go/nuget/Actions/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/AL-Go-Settings.json b/.github/AL-Go-Settings.json index f93f859..88f3acd 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -1,6 +1,6 @@ { "type": "PTE", - "templateUrl": "https://github.com/freddydk/AL-Go@CheckForUpdates", + "templateUrl": "https://github.com/freddydk/AL-Go@nuget", "DoNotUseCdnForArtifacts": true, "useCompilerFolder": true, "doNotPublishApps": true, @@ -28,5 +28,5 @@ "ContinuousDeployment": true, "runs-on": "ubuntu-latest" }, - "templateSha": "487e390e76603dddeef98fd023478e3970940f1b" + "templateSha": "03c67109fd663a21d274bad4c798bfb104002214" } diff --git a/.github/workflows/AddExistingAppOrTestApp.yaml b/.github/workflows/AddExistingAppOrTestApp.yaml index 4704769..d612185 100644 --- a/.github/workflows/AddExistingAppOrTestApp.yaml +++ b/.github/workflows/AddExistingAppOrTestApp.yaml @@ -13,13 +13,12 @@ on: description: Direct Download Url of .app or .zip file required: true directCommit: - description: Direct Commit? - type: boolean - default: false + description: Direct COMMIT (Y/N) + required: false + default: 'N' useGhTokenWorkflow: - description: Use GhTokenWorkflow for PR/Commit? + description: Use GhTokenWorkflow for Pull Request/COMMIT type: boolean - default: false permissions: contents: write @@ -35,38 +34,26 @@ env: jobs: AddExistingAppOrTestApp: - needs: [ ] runs-on: [ ubuntu-latest ] steps: - - name: Input - if: github.event_name == 'workflow_dispatch' - run: | - Write-Host "Inputs:" - $eventPath = Get-Content -Encoding UTF8 -Path $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json - $eventPath.inputs.psObject.Properties | Sort-Object { $_.Name } | ForEach-Object { - $property = $_.Name - $value = $eventPath.inputs."$property" - Write-Host "- $property = '$value'" - } - - name: Checkout uses: actions/checkout@v3 - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0090" - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -74,7 +61,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Add existing app - uses: freddydk/AL-Go/Actions/AddExistingApp@CheckForUpdates + uses: freddydk/AL-Go/Actions/AddExistingApp@nuget with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -85,7 +72,7 @@ jobs: - name: Finalize the workflow if: always() - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0090" diff --git a/.github/workflows/CICD.yaml b/.github/workflows/CICD.yaml index 4fbd85e..970a4b3 100644 --- a/.github/workflows/CICD.yaml +++ b/.github/workflows/CICD.yaml @@ -24,7 +24,6 @@ env: jobs: Initialization: - needs: [ ] runs-on: [ ubuntu-latest ] outputs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} @@ -46,14 +45,14 @@ jobs: - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0091" - name: Read settings id: ReadSettings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh get: type @@ -65,22 +64,22 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@nuget with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} - name: Determine Delivery Target Secrets id: DetermineDeliveryTargetSecrets - uses: freddydk/AL-Go/Actions/DetermineDeliveryTargets@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineDeliveryTargets@nuget with: shell: pwsh projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}' - checkContextSecrets: 'false' + checkContextSecrets: 'N' - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -88,7 +87,7 @@ jobs: - name: Determine Delivery Targets id: DetermineDeliveryTargets - uses: freddydk/AL-Go/Actions/DetermineDeliveryTargets@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineDeliveryTargets@nuget env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -98,7 +97,7 @@ jobs: - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: freddydk/AL-Go/Actions/DetermineDeploymentEnvironments@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineDeploymentEnvironments@nuget env: GITHUB_TOKEN: ${{ github.token }} with: @@ -107,24 +106,24 @@ jobs: type: 'CD' CheckForUpdates: - needs: [ Initialization ] runs-on: [ ubuntu-latest ] + needs: [ Initialization ] steps: - name: Checkout uses: actions/checkout@v3 - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh get: templateUrl - name: Check for updates to AL-Go system files - uses: freddydk/AL-Go/Actions/CheckForUpdates@CheckForUpdates + uses: freddydk/AL-Go/Actions/CheckForUpdates@nuget with: shell: pwsh + parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} templateUrl: ${{ env.templateUrl }} - downloadLatest: true Build: needs: [ Initialization ] @@ -169,7 +168,7 @@ jobs: path: '.artifacts' - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh @@ -182,7 +181,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -190,7 +189,7 @@ jobs: - name: Deploy id: Deploy - uses: freddydk/AL-Go/Actions/Deploy@CheckForUpdates + uses: freddydk/AL-Go/Actions/Deploy@nuget env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -219,20 +218,20 @@ jobs: path: '.artifacts' - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ matrix.deliveryTarget }}Context' - name: Deliver - uses: freddydk/AL-Go/Actions/Deliver@CheckForUpdates + uses: freddydk/AL-Go/Actions/Deliver@nuget env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -243,16 +242,16 @@ jobs: artifacts: '.artifacts' PostProcess: - needs: [ Initialization, Build, Deploy, Deliver ] if: (!cancelled()) runs-on: [ ubuntu-latest ] + needs: [ Initialization, Build, Deploy, Deliver ] steps: - name: Checkout uses: actions/checkout@v3 - name: Finalize the workflow id: PostProcess - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0091" diff --git a/.github/workflows/CreateApp.yaml b/.github/workflows/CreateApp.yaml index 7816b2c..015c91d 100644 --- a/.github/workflows/CreateApp.yaml +++ b/.github/workflows/CreateApp.yaml @@ -19,17 +19,16 @@ on: description: ID range (from..to) required: true sampleCode: - description: Include Sample code? - type: boolean - default: true + description: Include Sample code (Y/N) + required: false + default: 'Y' directCommit: - description: Direct Commit? - type: boolean - default: false + description: Direct COMMIT (Y/N) + required: false + default: "N" useGhTokenWorkflow: - description: Use GhTokenWorkflow for PR/Commit? + description: Use GhTokenWorkflow for Pull Request/COMMIT type: boolean - default: false permissions: contents: write @@ -45,39 +44,27 @@ env: jobs: CreateApp: - needs: [ ] runs-on: [ ubuntu-latest ] steps: - - name: Input - if: github.event_name == 'workflow_dispatch' - run: | - Write-Host "Inputs:" - $eventPath = Get-Content -Encoding UTF8 -Path $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json - $eventPath.inputs.psObject.Properties | Sort-Object { $_.Name } | ForEach-Object { - $property = $_.Name - $value = $eventPath.inputs."$property" - Write-Host "- $property = '$value'" - } - - name: Checkout uses: actions/checkout@v3 - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0092" - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh get: type - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -85,7 +72,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Creating a new app - uses: freddydk/AL-Go/Actions/CreateApp@CheckForUpdates + uses: freddydk/AL-Go/Actions/CreateApp@nuget with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -100,7 +87,7 @@ jobs: - name: Finalize the workflow if: always() - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0092" diff --git a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml index a10076f..7c0cf43 100644 --- a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml +++ b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml @@ -13,17 +13,16 @@ on: description: Name of the online environment required: true reUseExistingEnvironment: - description: Reuse environment if it exists? - type: boolean - default: false + description: Reuse environment if it exists + required: false + default: 'N' directCommit: - description: Direct Commit? - type: boolean - default: false + description: Direct COMMIT (Y/N) + required: false + default: 'N' useGhTokenWorkflow: - description: Use GhTokenWorkflow for PR/Commit? + description: Use GhTokenWorkflow for Pull Request/COMMIT type: boolean - default: false permissions: contents: write @@ -39,7 +38,6 @@ env: jobs: Initialization: - needs: [ ] runs-on: [ ubuntu-latest ] outputs: deviceCode: ${{ steps.authenticate.outputs.deviceCode }} @@ -47,36 +45,25 @@ jobs: githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} steps: - - name: Input - if: github.event_name == 'workflow_dispatch' - run: | - Write-Host "Inputs:" - $eventPath = Get-Content -Encoding UTF8 -Path $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json - $eventPath.inputs.psObject.Properties | Sort-Object { $_.Name } | ForEach-Object { - $property = $_.Name - $value = $eventPath.inputs."$property" - Write-Host "- $property = '$value'" - } - - name: Checkout uses: actions/checkout@v3 - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0093" - name: Read settings id: ReadSettings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -95,7 +82,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/freddydk/AL-Go/CheckForUpdates/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/freddydk/AL-Go/nuget/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -104,12 +91,12 @@ jobs: } CreateDevelopmentEnvironment: - needs: [ Initialization ] runs-on: ${{ fromJson(needs.Initialization.outputs.githubRunner) }} defaults: run: shell: ${{ needs.Initialization.outputs.githubRunnerShell }} name: Create Development Environment + needs: [ Initialization ] env: deviceCode: ${{ needs.Initialization.outputs.deviceCode }} steps: @@ -117,13 +104,13 @@ jobs: uses: actions/checkout@v3 - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -142,7 +129,7 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -value "adminCenterApiCredentials=$adminCenterApiCredentials" - name: Create Development Environment - uses: freddydk/AL-Go/Actions/CreateDevelopmentEnvironment@CheckForUpdates + uses: freddydk/AL-Go/Actions/CreateDevelopmentEnvironment@nuget with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -155,7 +142,7 @@ jobs: - name: Finalize the workflow if: always() - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0093" diff --git a/.github/workflows/CreatePerformanceTestApp.yaml b/.github/workflows/CreatePerformanceTestApp.yaml index 63a338f..216616c 100644 --- a/.github/workflows/CreatePerformanceTestApp.yaml +++ b/.github/workflows/CreatePerformanceTestApp.yaml @@ -21,21 +21,20 @@ on: required: true default: '50000..99999' sampleCode: - description: Include Sample code? - type: boolean - default: true + description: Include Sample code (Y/N) + required: false + default: 'Y' sampleSuite: - description: Include Sample BCPT Suite? - type: boolean - default: true + description: Include Sample BCPT Suite (Y/N) + required: false + default: 'Y' directCommit: - description: Direct Commit? - type: boolean - default: false + description: Direct COMMIT (Y/N) + required: false + default: 'N' useGhTokenWorkflow: - description: Use GhTokenWorkflow for PR/Commit? + description: Use GhTokenWorkflow for Pull Request/COMMIT type: boolean - default: false permissions: contents: write @@ -51,38 +50,26 @@ env: jobs: CreatePerformanceTestApp: - needs: [ ] runs-on: [ ubuntu-latest ] steps: - - name: Input - if: github.event_name == 'workflow_dispatch' - run: | - Write-Host "Inputs:" - $eventPath = Get-Content -Encoding UTF8 -Path $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json - $eventPath.inputs.psObject.Properties | Sort-Object { $_.Name } | ForEach-Object { - $property = $_.Name - $value = $eventPath.inputs."$property" - Write-Host "- $property = '$value'" - } - - name: Checkout uses: actions/checkout@v3 - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0102" - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -90,7 +77,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Creating a new test app - uses: freddydk/AL-Go/Actions/CreateApp@CheckForUpdates + uses: freddydk/AL-Go/Actions/CreateApp@nuget with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -106,7 +93,7 @@ jobs: - name: Finalize the workflow if: always() - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0102" diff --git a/.github/workflows/CreateRelease.yaml b/.github/workflows/CreateRelease.yaml index 5e1dde8..77eb6c5 100644 --- a/.github/workflows/CreateRelease.yaml +++ b/.github/workflows/CreateRelease.yaml @@ -16,29 +16,28 @@ on: required: true default: '' prerelease: - description: Prerelease? - type: boolean - default: false + description: Prerelease (Y/N) + required: false + default: 'N' draft: - description: Draft? - type: boolean - default: false + description: Draft (Y/N) + required: false + default: 'N' createReleaseBranch: - description: Create Release Branch? - type: boolean - default: false + description: Create Release Branch (Y/N) + required: false + default: 'N' updateVersionNumber: description: New Version Number in main branch. Use Major.Minor for absolute change, use +Major.Minor for incremental change. required: false default: '' directCommit: - description: Direct Commit? - type: boolean - default: false + description: Direct COMMIT (Y/N) + required: false + default: 'N' useGhTokenWorkflow: - description: Use GhTokenWorkflow for PR/Commit? + description: Use GhTokenWorkflow for Pull Request/COMMIT type: boolean - default: false permissions: contents: write @@ -57,7 +56,6 @@ env: jobs: CreateRelease: - needs: [ ] runs-on: [ ubuntu-latest ] outputs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} @@ -66,46 +64,35 @@ jobs: commitish: ${{ steps.analyzeartifacts.outputs.commitish }} releaseBranch: ${{ steps.createreleasenotes.outputs.releaseBranch }} steps: - - name: Input - if: github.event_name == 'workflow_dispatch' - run: | - Write-Host "Inputs:" - $eventPath = Get-Content -Encoding UTF8 -Path $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json - $eventPath.inputs.psObject.Properties | Sort-Object { $_.Name } | ForEach-Object { - $property = $_.Name - $value = $eventPath.inputs."$property" - Write-Host "- $property = '$value'" - } - - name: Checkout uses: actions/checkout@v3 - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0094" - name: Read settings id: ReadSettings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh get: templateUrl,repoName - name: Determine Projects id: determineProjects - uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@nuget with: shell: pwsh - name: Check for updates to AL-Go system files - uses: freddydk/AL-Go/Actions/CheckForUpdates@CheckForUpdates + uses: freddydk/AL-Go/Actions/CheckForUpdates@nuget with: shell: pwsh + parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} templateUrl: ${{ env.templateUrl }} - downloadLatest: true - name: Analyze Artifacts id: analyzeartifacts @@ -186,7 +173,7 @@ jobs: - name: Prepare release notes id: createreleasenotes - uses: freddydk/AL-Go/Actions/CreateReleaseNotes@CheckForUpdates + uses: freddydk/AL-Go/Actions/CreateReleaseNotes@nuget with: shell: pwsh parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} @@ -208,8 +195,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' || github.event.inputs.draft=='Y' }}, - prerelease: ${{ github.event.inputs.prerelease=='true' || github.event.inputs.prerelease=='Y' }}, + draft: ${{ github.event.inputs.draft=='Y' }}, + prerelease: ${{ github.event.inputs.prerelease=='Y' }}, make_latest: 'legacy', target_commitish: '${{ steps.analyzeartifacts.outputs.commitish }}' }); @@ -219,8 +206,8 @@ jobs: core.setOutput('releaseId', releaseId); UploadArtifacts: - needs: [ CreateRelease ] runs-on: [ ubuntu-latest ] + needs: [ CreateRelease ] strategy: matrix: ${{ fromJson(needs.CreateRelease.outputs.artifacts) }} fail-fast: true @@ -229,13 +216,13 @@ jobs: uses: actions/checkout@v3 - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -272,7 +259,7 @@ jobs: }); - name: Deliver to NuGet - uses: freddydk/AL-Go/Actions/Deliver@CheckForUpdates + uses: freddydk/AL-Go/Actions/Deliver@nuget if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).nuGetContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -285,7 +272,7 @@ jobs: atypes: 'Apps,TestApps' - name: Deliver to Storage - uses: freddydk/AL-Go/Actions/Deliver@CheckForUpdates + uses: freddydk/AL-Go/Actions/Deliver@nuget if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).storageContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -298,9 +285,9 @@ jobs: atypes: 'Apps,TestApps,Dependencies' CreateReleaseBranch: - needs: [ CreateRelease, UploadArtifacts ] - if: ${{ github.event.inputs.createReleaseBranch=='true' || github.event.inputs.createReleaseBranch=='Y' }} + if: ${{ github.event.inputs.createReleaseBranch=='Y' }} runs-on: [ ubuntu-latest ] + needs: [ CreateRelease, UploadArtifacts ] steps: - name: Checkout uses: actions/checkout@v3 @@ -317,18 +304,18 @@ jobs: git push origin ${{ needs.CreateRelease.outputs.releaseBranch }} UpdateVersionNumber: - needs: [ CreateRelease, UploadArtifacts ] if: ${{ github.event.inputs.updateVersionNumber!='' }} runs-on: [ ubuntu-latest ] + needs: [ CreateRelease, UploadArtifacts ] steps: - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -336,7 +323,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Update Version Number - uses: freddydk/AL-Go/Actions/IncrementVersionNumber@CheckForUpdates + uses: freddydk/AL-Go/Actions/IncrementVersionNumber@nuget with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -345,16 +332,16 @@ jobs: directCommit: ${{ github.event.inputs.directCommit }} PostProcess: - needs: [ CreateRelease, UploadArtifacts, CreateReleaseBranch, UpdateVersionNumber ] if: always() runs-on: [ ubuntu-latest ] + needs: [ CreateRelease, UploadArtifacts, CreateReleaseBranch, UpdateVersionNumber ] steps: - name: Checkout uses: actions/checkout@v3 - name: Finalize the workflow id: PostProcess - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0094" diff --git a/.github/workflows/CreateTestApp.yaml b/.github/workflows/CreateTestApp.yaml index bcd4151..9a41697 100644 --- a/.github/workflows/CreateTestApp.yaml +++ b/.github/workflows/CreateTestApp.yaml @@ -21,17 +21,16 @@ on: required: true default: '50000..99999' sampleCode: - description: Include Sample code? - type: boolean - default: true + description: Include Sample code (Y/N) + required: false + default: 'Y' directCommit: - description: Direct Commit? - type: boolean - default: false + description: Direct COMMIT (Y/N) + required: false + default: 'N' useGhTokenWorkflow: - description: Use GhTokenWorkflow for PR/Commit? + description: Use GhTokenWorkflow for Pull Request/COMMIT type: boolean - default: false permissions: contents: write @@ -47,38 +46,26 @@ env: jobs: CreateTestApp: - needs: [ ] runs-on: [ ubuntu-latest ] steps: - - name: Input - if: github.event_name == 'workflow_dispatch' - run: | - Write-Host "Inputs:" - $eventPath = Get-Content -Encoding UTF8 -Path $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json - $eventPath.inputs.psObject.Properties | Sort-Object { $_.Name } | ForEach-Object { - $property = $_.Name - $value = $eventPath.inputs."$property" - Write-Host "- $property = '$value'" - } - - name: Checkout uses: actions/checkout@v3 - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0095" - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -86,7 +73,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Creating a new test app - uses: freddydk/AL-Go/Actions/CreateApp@CheckForUpdates + uses: freddydk/AL-Go/Actions/CreateApp@nuget with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -101,7 +88,7 @@ jobs: - name: Finalize the workflow if: always() - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0095" diff --git a/.github/workflows/Current.yaml b/.github/workflows/Current.yaml index 298f127..0d968c4 100644 --- a/.github/workflows/Current.yaml +++ b/.github/workflows/Current.yaml @@ -17,7 +17,6 @@ env: jobs: Initialization: - needs: [ ] runs-on: [ ubuntu-latest ] outputs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} @@ -35,14 +34,14 @@ jobs: - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0101" - name: Read settings id: ReadSettings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh @@ -53,7 +52,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@nuget with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -81,16 +80,16 @@ jobs: artifactsNameSuffix: 'Current' PostProcess: - needs: [ Initialization, Build ] if: always() runs-on: [ ubuntu-latest ] + needs: [ Initialization, Build ] steps: - name: Checkout uses: actions/checkout@v3 - name: Finalize the workflow id: PostProcess - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0101" diff --git a/.github/workflows/IncrementVersionNumber.yaml b/.github/workflows/IncrementVersionNumber.yaml index 790860b..4478c1f 100644 --- a/.github/workflows/IncrementVersionNumber.yaml +++ b/.github/workflows/IncrementVersionNumber.yaml @@ -5,21 +5,20 @@ run-name: "Increment Version Number in [${{ github.ref_name }}]" on: workflow_dispatch: inputs: - projects: - description: Comma seperated list of project names if the repository is setup for multiple projects (default is * for all projects) + project: + description: Project name if the repository is setup for multiple projects (* for all projects) required: false default: '*' versionNumber: description: Updated Version Number. Use Major.Minor for absolute change, use +Major.Minor for incremental change. required: true directCommit: - description: Direct Commit? - type: boolean - default: false + description: Direct COMMIT (Y/N) + required: false + default: 'N' useGhTokenWorkflow: - description: Use GhTokenWorkflow for PR/Commit? + description: Use GhTokenWorkflow for Pull Request/COMMIT type: boolean - default: false permissions: contents: write @@ -35,38 +34,26 @@ env: jobs: IncrementVersionNumber: - needs: [ ] runs-on: [ ubuntu-latest ] steps: - - name: Input - if: github.event_name == 'workflow_dispatch' - run: | - Write-Host "Inputs:" - $eventPath = Get-Content -Encoding UTF8 -Path $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json - $eventPath.inputs.psObject.Properties | Sort-Object { $_.Name } | ForEach-Object { - $property = $_.Name - $value = $eventPath.inputs."$property" - Write-Host "- $property = '$value'" - } - - name: Checkout uses: actions/checkout@v3 - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0096" - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -74,18 +61,18 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Increment Version Number - uses: freddydk/AL-Go/Actions/IncrementVersionNumber@CheckForUpdates + uses: freddydk/AL-Go/Actions/IncrementVersionNumber@nuget with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} - project: ${{ github.event.inputs.projects }} + project: ${{ github.event.inputs.project }} versionNumber: ${{ github.event.inputs.versionNumber }} directCommit: ${{ github.event.inputs.directCommit }} - name: Finalize the workflow if: always() - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0096" diff --git a/.github/workflows/NextMajor.yaml b/.github/workflows/NextMajor.yaml index 54c1bab..a5b111e 100644 --- a/.github/workflows/NextMajor.yaml +++ b/.github/workflows/NextMajor.yaml @@ -17,7 +17,6 @@ env: jobs: Initialization: - needs: [ ] runs-on: [ ubuntu-latest ] outputs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} @@ -35,14 +34,14 @@ jobs: - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0099" - name: Read settings id: ReadSettings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh @@ -53,7 +52,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@nuget with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -81,16 +80,16 @@ jobs: artifactsNameSuffix: 'NextMajor' PostProcess: - needs: [ Initialization, Build ] if: always() runs-on: [ ubuntu-latest ] + needs: [ Initialization, Build ] steps: - name: Checkout uses: actions/checkout@v3 - name: Finalize the workflow id: PostProcess - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0099" diff --git a/.github/workflows/NextMinor.yaml b/.github/workflows/NextMinor.yaml index e71381b..c6ebbe4 100644 --- a/.github/workflows/NextMinor.yaml +++ b/.github/workflows/NextMinor.yaml @@ -17,7 +17,6 @@ env: jobs: Initialization: - needs: [ ] runs-on: [ ubuntu-latest ] outputs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} @@ -35,14 +34,14 @@ jobs: - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0100" - name: Read settings id: ReadSettings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh @@ -53,7 +52,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@nuget with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -81,16 +80,16 @@ jobs: artifactsNameSuffix: 'NextMinor' PostProcess: - needs: [ Initialization, Build ] if: always() runs-on: [ ubuntu-latest ] + needs: [ Initialization, Build ] steps: - name: Checkout uses: actions/checkout@v3 - name: Finalize the workflow id: PostProcess - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0100" diff --git a/.github/workflows/PublishToEnvironment.yaml b/.github/workflows/PublishToEnvironment.yaml index 0d33080..e117ec7 100644 --- a/.github/workflows/PublishToEnvironment.yaml +++ b/.github/workflows/PublishToEnvironment.yaml @@ -25,7 +25,6 @@ env: jobs: Initialization: - needs: [ ] runs-on: [ ubuntu-latest ] outputs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} @@ -34,36 +33,25 @@ jobs: deploymentEnvironmentsJson: ${{ steps.DetermineDeploymentEnvironments.outputs.DeploymentEnvironmentsJson }} deviceCode: ${{ steps.Authenticate.outputs.deviceCode }} steps: - - name: Input - if: github.event_name == 'workflow_dispatch' - run: | - Write-Host "Inputs:" - $eventPath = Get-Content -Encoding UTF8 -Path $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json - $eventPath.inputs.psObject.Properties | Sort-Object { $_.Name } | ForEach-Object { - $property = $_.Name - $value = $eventPath.inputs."$property" - Write-Host "- $property = '$value'" - } - - name: Checkout uses: actions/checkout@v3 - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: pwsh eventId: "DO0097" - name: Read settings id: ReadSettings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: freddydk/AL-Go/Actions/DetermineDeploymentEnvironments@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineDeploymentEnvironments@nuget env: GITHUB_TOKEN: ${{ github.token }} with: @@ -81,7 +69,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget if: steps.DetermineDeploymentEnvironments.outputs.UnknownEnvironment == 1 with: shell: pwsh @@ -113,7 +101,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/freddydk/AL-Go/CheckForUpdates/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/freddydk/AL-Go/nuget/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -144,13 +132,13 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "envName=$envName" - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -158,7 +146,7 @@ jobs: - name: Deploy id: Deploy - uses: freddydk/AL-Go/Actions/Deploy@CheckForUpdates + uses: freddydk/AL-Go/Actions/Deploy@nuget env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -169,16 +157,16 @@ jobs: deploymentEnvironmentsJson: ${{ needs.Initialization.outputs.deploymentEnvironmentsJson }} PostProcess: - needs: [ Initialization, Deploy ] if: always() runs-on: [ ubuntu-latest ] + needs: [ Initialization, Deploy ] steps: - name: Checkout uses: actions/checkout@v3 - name: Finalize the workflow id: PostProcess - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: pwsh eventId: "DO0097" diff --git a/.github/workflows/PullRequestHandler.yaml b/.github/workflows/PullRequestHandler.yaml index bfda911..72845ef 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: freddydk/AL-Go/Actions/VerifyPRChanges@CheckForUpdates + - uses: freddydk/AL-Go/Actions/VerifyPRChanges@nuget Initialization: needs: [ PregateCheck ] @@ -50,14 +50,14 @@ jobs: - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: powershell eventId: "DO0104" - name: Read settings id: ReadSettings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: powershell @@ -68,7 +68,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@CheckForUpdates + uses: freddydk/AL-Go/Actions/DetermineProjectsToBuild@nuget with: shell: powershell maxBuildDepth: ${{ env.workflowDepth }} @@ -96,14 +96,14 @@ jobs: publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} StatusCheck: + runs-on: [ windows-latest ] needs: [ Initialization, Build ] if: (!cancelled()) - runs-on: [ windows-latest ] name: Pull Request Status Check steps: - name: Pull Request Status Check id: PullRequestStatusCheck - uses: freddydk/AL-Go/Actions/PullRequestStatusCheck@CheckForUpdates + uses: freddydk/AL-Go/Actions/PullRequestStatusCheck@nuget env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/UpdateGitHubGoSystemFiles.yaml b/.github/workflows/UpdateGitHubGoSystemFiles.yaml index 3fc548b..c5ebd5a 100644 --- a/.github/workflows/UpdateGitHubGoSystemFiles.yaml +++ b/.github/workflows/UpdateGitHubGoSystemFiles.yaml @@ -4,17 +4,13 @@ on: workflow_dispatch: inputs: templateUrl: - description: Template Repository URL (current is https://github.com/freddydk/AL-Go@CheckForUpdates) + description: Template Repository URL (current is https://github.com/freddydk/AL-Go@nuget) required: false default: '' - downloadLatest: - description: Download latest from template repository - type: boolean - default: true directCommit: - description: Direct Commit - type: boolean - default: false + description: Direct COMMIT (Y/N) + required: false + default: 'N' permissions: contents: read @@ -29,39 +25,27 @@ env: jobs: UpdateALGoSystemFiles: - needs: [ ] runs-on: [ windows-latest ] steps: - - name: Input - if: github.event_name == 'workflow_dispatch' - run: | - Write-Host "Inputs:" - $eventPath = Get-Content -Encoding UTF8 -Path $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json - $eventPath.inputs.psObject.Properties | Sort-Object { $_.Name } | ForEach-Object { - $property = $_.Name - $value = $eventPath.inputs."$property" - Write-Host "- $property = '$value'" - } - - name: Checkout uses: actions/checkout@v3 - name: Initialize the workflow id: init - uses: freddydk/AL-Go/Actions/WorkflowInitialize@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowInitialize@nuget with: shell: powershell eventId: "DO0098" - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSettings@nuget with: shell: powershell get: templateUrl - name: Read secrets id: ReadSecrets - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget with: shell: powershell gitHubSecrets: ${{ toJson(secrets) }} @@ -78,37 +62,33 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "templateUrl=$templateUrl" } - - name: Calculate Input + - name: Calculate DirectCommit env: - directCommit: '${{ github.event.inputs.directCommit }}' - downloadLatest: ${{ github.event.inputs.downloadLatest }} + directCommit: ${{ github.event.inputs.directCommit }} eventName: ${{ github.event_name }} 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 amd DownloadLatest to true" - $directCommit = 'true' - $downloadLatest = 'true' + Write-Host "Running Update AL-Go System Files on a schedule. Setting DirectCommit = Y" + $directCommit = 'Y' } - Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "directCommit=$directCommit" - Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "downloadLatest=$downloadLatest" + Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "DirectCommit=$directCommit" - name: Update AL-Go system files - uses: freddydk/AL-Go/Actions/CheckForUpdates@CheckForUpdates + uses: freddydk/AL-Go/Actions/CheckForUpdates@nuget with: shell: powershell + parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} token: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).ghTokenWorkflow }} - DownloadLatest: ${{ env.downloadLatest }} - Update: true + Update: Y templateUrl: ${{ env.templateUrl }} directCommit: ${{ env.directCommit }} - name: Finalize the workflow if: always() - uses: freddydk/AL-Go/Actions/WorkflowPostProcess@CheckForUpdates + uses: freddydk/AL-Go/Actions/WorkflowPostProcess@nuget with: shell: powershell eventId: "DO0098" diff --git a/.github/workflows/_BuildALGoProject.yaml b/.github/workflows/_BuildALGoProject.yaml index 17739e7..6b61558 100644 --- a/.github/workflows/_BuildALGoProject.yaml +++ b/.github/workflows/_BuildALGoProject.yaml @@ -43,12 +43,14 @@ on: type: string publishThisBuildArtifacts: description: Flag indicating whether this build artifacts should be published - type: boolean + required: false default: false + type: boolean publishArtifacts: description: Flag indicating whether the artifacts should be published - type: boolean + required: false default: false + type: boolean artifactsNameSuffix: description: Suffix to add to the artifacts names required: false @@ -56,12 +58,14 @@ on: type: string signArtifacts: description: Flag indicating whether the apps should be signed - type: boolean + required: false default: false + type: boolean useArtifactCache: description: Flag determining whether to use the Artifacts Cache - type: boolean + required: false default: false + type: boolean parentTelemetryScopeJson: description: Specifies the telemetry scope for the telemetry signal required: false @@ -73,183 +77,179 @@ env: jobs: BuildALGoProject: - needs: [ ] runs-on: ${{ fromJson(inputs.runsOn) }} - defaults: - run: - shell: ${{ inputs.shell }} name: ${{ inputs.projectName }} (${{ inputs.buildMode }}) steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ inputs.checkoutRef }} - lfs: true - - - name: Read settings - uses: freddydk/AL-Go/Actions/ReadSettings@CheckForUpdates - with: - shell: ${{ inputs.shell }} - project: ${{ inputs.project }} - get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,artifact - - - name: Read secrets - id: ReadSecrets - if: github.event_name != 'pull_request' - uses: freddydk/AL-Go/Actions/ReadSecrets@CheckForUpdates - with: - shell: ${{ inputs.shell }} - gitHubSecrets: ${{ toJson(secrets) }} - getSecrets: '${{ inputs.secrets }},appDependencyProbingPathsSecrets' - - - name: Determine ArtifactUrl - uses: freddydk/AL-Go/Actions/DetermineArtifactUrl@CheckForUpdates - id: determineArtifactUrl - with: - shell: ${{ inputs.shell }} - parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} - project: ${{ inputs.project }} - - - name: Cache Business Central Artifacts - if: env.useCompilerFolder == 'True' && inputs.useArtifactCache && env.artifactCacheKey - uses: actions/cache@v3 - with: - path: .artifactcache - key: ${{ env.artifactCacheKey }} - - - name: Download Project Dependencies - id: DownloadProjectDependencies - uses: freddydk/AL-Go/Actions/DownloadProjectDependencies@CheckForUpdates - env: - Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' - with: - shell: ${{ inputs.shell }} - project: ${{ inputs.project }} - buildMode: ${{ inputs.buildMode }} - projectsDependenciesJson: ${{ inputs.projectDependenciesJson }} - - - name: Build - uses: freddydk/AL-Go/Actions/RunPipeline@CheckForUpdates - env: - Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' - BuildMode: ${{ inputs.buildMode }} - with: - shell: ${{ inputs.shell }} - parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} - artifact: ${{ env.artifact }} - project: ${{ inputs.project }} - buildMode: ${{ inputs.buildMode }} - installAppsJson: ${{ steps.DownloadProjectDependencies.outputs.DownloadedApps }} - installTestAppsJson: ${{ steps.DownloadProjectDependencies.outputs.DownloadedTestApps }} - - - name: Sign - if: inputs.signArtifacts && env.doNotSignApps == 'False' && env.keyVaultCodesignCertificateName != '' - id: sign - uses: freddydk/AL-Go/Actions/Sign@CheckForUpdates - with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - azureCredentialsJson: ${{ secrets.AZURE_CREDENTIALS }} - pathToFiles: '${{ inputs.project }}/.buildartifacts/Apps/*.app' - parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} - - - name: Calculate Artifact names - id: calculateArtifactsNames - uses: freddydk/AL-Go/Actions/CalculateArtifactNames@CheckForUpdates - if: success() || failure() - with: - shell: ${{ inputs.shell }} - project: ${{ inputs.project }} - buildMode: ${{ inputs.buildMode }} - branchName: ${{ github.ref_name }} - suffix: ${{ inputs.artifactsNameSuffix }} - - - name: Upload thisbuild artifacts - apps - if: inputs.publishThisBuildArtifacts - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildAppsArtifactsName }} - path: '${{ inputs.project }}/.buildartifacts/Apps/' - if-no-files-found: ignore - retention-days: 1 - - - name: Upload thisbuild artifacts - test apps - if: inputs.publishThisBuildArtifacts - uses: actions/upload-artifact@v3 - 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@v3 - if: inputs.publishArtifacts - with: - name: ${{ steps.calculateArtifactsNames.outputs.AppsArtifactsName }} - path: '${{ inputs.project }}/.buildartifacts/Apps/' - if-no-files-found: ignore - - - name: Publish artifacts - dependencies - uses: actions/upload-artifact@v3 - if: inputs.publishArtifacts - with: - name: ${{ steps.calculateArtifactsNames.outputs.DependenciesArtifactsName }} - path: '${{ inputs.project }}/.buildartifacts/Dependencies/' - if-no-files-found: ignore - - - name: Publish artifacts - test apps - uses: actions/upload-artifact@v3 - if: inputs.publishArtifacts - with: - name: ${{ steps.calculateArtifactsNames.outputs.TestAppsArtifactsName }} - path: '${{ inputs.project }}/.buildartifacts/TestApps/' - if-no-files-found: ignore - - - name: Publish artifacts - build output - uses: actions/upload-artifact@v3 - if: (success() || failure()) && (hashFiles(format('{0}/BuildOutput.txt',inputs.project)) != '') - with: - name: ${{ steps.calculateArtifactsNames.outputs.BuildOutputArtifactsName }} - path: '${{ inputs.project }}/BuildOutput.txt' - if-no-files-found: ignore - - - name: Publish artifacts - container event log - uses: actions/upload-artifact@v3 - if: (failure()) && (hashFiles(format('{0}/ContainerEventLog.evtx',inputs.project)) != '') - with: - name: ${{ steps.calculateArtifactsNames.outputs.ContainerEventLogArtifactsName }} - path: '${{ inputs.project }}/ContainerEventLog.evtx' - if-no-files-found: ignore - - - name: Publish artifacts - test results - uses: actions/upload-artifact@v3 - if: (success() || failure()) && (hashFiles(format('{0}/TestResults.xml',inputs.project)) != '') - with: - name: ${{ steps.calculateArtifactsNames.outputs.TestResultsArtifactsName }} - path: '${{ inputs.project }}/TestResults.xml' - if-no-files-found: ignore - - - name: Publish artifacts - bcpt test results - uses: actions/upload-artifact@v3 - if: (success() || failure()) && (hashFiles(format('{0}/bcptTestResults.json',inputs.project)) != '') - with: - name: ${{ steps.calculateArtifactsNames.outputs.BcptTestResultsArtifactsName }} - path: '${{ inputs.project }}/bcptTestResults.json' - if-no-files-found: ignore - - - name: Analyze Test Results - id: analyzeTestResults - if: success() || failure() - uses: freddydk/AL-Go/Actions/AnalyzeTests@CheckForUpdates - with: - shell: ${{ inputs.shell }} - parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} - project: ${{ inputs.project }} - - - name: Cleanup - if: always() - uses: freddydk/AL-Go/Actions/PipelineCleanup@CheckForUpdates - with: - shell: ${{ inputs.shell }} - parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} - project: ${{ inputs.project }} + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ inputs.checkoutRef }} + lfs: true + + - name: Read settings + uses: freddydk/AL-Go/Actions/ReadSettings@nuget + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,doNotRunTests,artifact + + - name: Read secrets + id: ReadSecrets + if: github.event_name != 'pull_request' + uses: freddydk/AL-Go/Actions/ReadSecrets@nuget + with: + shell: ${{ inputs.shell }} + gitHubSecrets: ${{ toJson(secrets) }} + getSecrets: '${{ inputs.secrets }},appDependencyProbingPathsSecrets' + + - name: Determine ArtifactUrl + uses: freddydk/AL-Go/Actions/DetermineArtifactUrl@nuget + id: determineArtifactUrl + with: + shell: ${{ inputs.shell }} + parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} + project: ${{ inputs.project }} + + - name: Cache Business Central Artifacts + if: env.useCompilerFolder == 'True' && inputs.useArtifactCache && env.artifactCacheKey + uses: actions/cache@v3 + with: + path: .artifactcache + key: ${{ env.artifactCacheKey }} + + - name: Download Project Dependencies + id: DownloadProjectDependencies + uses: freddydk/AL-Go/Actions/DownloadProjectDependencies@nuget + env: + Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + buildMode: ${{ inputs.buildMode }} + projectsDependenciesJson: ${{ inputs.projectDependenciesJson }} + + - name: Run pipeline + id: RunPipeline + uses: freddydk/AL-Go/Actions/RunPipeline@nuget + env: + Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' + BuildMode: ${{ inputs.buildMode }} + with: + shell: ${{ inputs.shell }} + parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} + artifact: ${{ env.artifact }} + project: ${{ inputs.project }} + buildMode: ${{ inputs.buildMode }} + installAppsJson: ${{ steps.DownloadProjectDependencies.outputs.DownloadedApps }} + installTestAppsJson: ${{ steps.DownloadProjectDependencies.outputs.DownloadedTestApps }} + + - name: Sign + if: inputs.signArtifacts && env.doNotSignApps == 'False' && env.keyVaultCodesignCertificateName != '' + id: sign + uses: freddydk/AL-Go/Actions/Sign@nuget + with: + shell: ${{ needs.Initialization.outputs.githubRunnerShell }} + azureCredentialsJson: ${{ secrets.AZURE_CREDENTIALS }} + pathToFiles: '${{ inputs.project }}/.buildartifacts/Apps/*.app' + parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} + + - name: Calculate Artifact names + id: calculateArtifactsNames + uses: freddydk/AL-Go/Actions/CalculateArtifactNames@nuget + if: success() || failure() + with: + shell: ${{ inputs.shell }} + project: ${{ inputs.project }} + buildMode: ${{ inputs.buildMode }} + suffix: ${{ inputs.artifactsNameSuffix }} + + - name: Upload thisbuild artifacts - apps + if: inputs.publishThisBuildArtifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildAppsArtifactsName }} + path: '${{ inputs.project }}/.buildartifacts/Apps/' + if-no-files-found: ignore + retention-days: 1 + + - name: Upload thisbuild artifacts - test apps + if: inputs.publishThisBuildArtifacts + uses: actions/upload-artifact@v3 + 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@v3 + if: inputs.publishArtifacts + with: + name: ${{ steps.calculateArtifactsNames.outputs.AppsArtifactsName }} + path: '${{ inputs.project }}/.buildartifacts/Apps/' + if-no-files-found: ignore + + - name: Publish artifacts - dependencies + uses: actions/upload-artifact@v3 + if: inputs.publishArtifacts + with: + name: ${{ steps.calculateArtifactsNames.outputs.DependenciesArtifactsName }} + path: '${{ inputs.project }}/.buildartifacts/Dependencies/' + if-no-files-found: ignore + + - name: Publish artifacts - test apps + uses: actions/upload-artifact@v3 + if: inputs.publishArtifacts + with: + name: ${{ steps.calculateArtifactsNames.outputs.TestAppsArtifactsName }} + path: '${{ inputs.project }}/.buildartifacts/TestApps/' + if-no-files-found: ignore + + - name: Publish artifacts - build output + uses: actions/upload-artifact@v3 + if: (success() || failure()) && (hashFiles(format('{0}/BuildOutput.txt',inputs.project)) != '') + with: + name: ${{ steps.calculateArtifactsNames.outputs.BuildOutputArtifactsName }} + path: '${{ inputs.project }}/BuildOutput.txt' + if-no-files-found: ignore + + - name: Publish artifacts - container event log + uses: actions/upload-artifact@v3 + if: (failure()) && (hashFiles(format('{0}/ContainerEventLog.evtx',inputs.project)) != '') + with: + name: ${{ steps.calculateArtifactsNames.outputs.ContainerEventLogArtifactsName }} + path: '${{ inputs.project }}/ContainerEventLog.evtx' + if-no-files-found: ignore + + - name: Publish artifacts - test results + uses: actions/upload-artifact@v3 + if: (success() || failure()) && (hashFiles(format('{0}/TestResults.xml',inputs.project)) != '') + with: + name: ${{ steps.calculateArtifactsNames.outputs.TestResultsArtifactsName }} + path: '${{ inputs.project }}/TestResults.xml' + if-no-files-found: ignore + + - name: Publish artifacts - bcpt test results + uses: actions/upload-artifact@v3 + if: (success() || failure()) && (hashFiles(format('{0}/bcptTestResults.json',inputs.project)) != '') + with: + name: ${{ steps.calculateArtifactsNames.outputs.BcptTestResultsArtifactsName }} + path: '${{ inputs.project }}/bcptTestResults.json' + if-no-files-found: ignore + + - name: Analyze Test Results + id: analyzeTestResults + if: (success() || failure()) && env.doNotRunTests == 'False' + uses: freddydk/AL-Go/Actions/AnalyzeTests@nuget + with: + shell: ${{ inputs.shell }} + parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} + project: ${{ inputs.project }} + + - name: Cleanup + if: always() + uses: freddydk/AL-Go/Actions/PipelineCleanup@nuget + with: + shell: ${{ inputs.shell }} + parentTelemetryScopeJson: ${{ inputs.parentTelemetryScopeJson }} + project: ${{ inputs.project }}