Skip to content

Commit d26add8

Browse files
vicperdanaCopilot
andcommitted
fix: address PR #407 review issues and build failure
- Remove legacy build.yaml and analyze.yaml workflows (superseded by ci.yml and codeql.yml); fixes 'Missing default script' CI build error - Use $PSScriptRoot-based paths in pipeline.build.ps1 CopyModule task for reliable path resolution regardless of working directory - Add error handling for Get-LocalPSDocsModule return value in build.ps1 - Guard vscode-ci.yml publish step with VSCE_PAT secret existence check - Document workflow migration in MONOREPO_MIGRATION.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e6a81b3 commit d26add8

6 files changed

Lines changed: 25 additions & 229 deletions

File tree

.github/workflows/analyze.yaml

Lines changed: 0 additions & 81 deletions
This file was deleted.

.github/workflows/build.yaml

Lines changed: 0 additions & 143 deletions
This file was deleted.

.github/workflows/vscode-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ jobs:
157157
echo "Found VSIX: $VSIX_FILE"
158158
159159
- name: Publish to VS Marketplace (Pre-release)
160+
if: env.VSCE_PAT != ''
160161
working-directory: packages/vscode-extension/out/package
161162
env:
162163
VSCE_PAT: ${{ secrets.VSCE_PAT }}

MONOREPO_MIGRATION.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,22 @@ git subtree pull --prefix=packages/psdocs https://github.com/microsoft/PSDocs.gi
145145
git subtree pull --prefix=packages/vscode-extension https://github.com/microsoft/PSDocs-vscode.git main --squash
146146
```
147147

148+
## Workflow Migration
149+
150+
The following legacy workflows were removed as part of the monorepo migration, replaced by new workflows with path-based filtering:
151+
152+
| Removed Workflow | Replacement | Reason |
153+
|-----------------|-------------|--------|
154+
| `build.yaml` | `ci.yml` | Old single-package build; incompatible with monorepo `build.ps1` orchestrator |
155+
| `analyze.yaml` | `codeql.yml` | Replaced with updated CodeQL security scanning workflow |
156+
157+
The following workflows were **kept** as they are independent of the build structure:
158+
159+
| Kept Workflow | Purpose |
160+
|--------------|---------|
161+
| `docs.yaml` | Documentation site generation (publishes to GitHub Pages) |
162+
| `stale.yaml` | Stale issue management (automated issue lifecycle) |
163+
148164
## Questions?
149165

150166
For questions about:

build.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ foreach ($pkg in $packages) {
9898

9999
# After building psdocs, set up module path for psdocs-azure
100100
if ($pkg -eq 'psdocs' -and $Build) {
101-
Get-LocalPSDocsModule | Out-Null
101+
$moduleInitialized = Get-LocalPSDocsModule
102+
if (-not $moduleInitialized) {
103+
Write-Error "Failed to locate or initialize the local PSDocs module. Cannot continue building dependent packages."
104+
}
102105
}
103106
}
104107

packages/psdocs-azure/pipeline.build.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ task ModuleDependencies NuGet, PSDocs
197197
task CopyModule {
198198
CopyModuleFiles -Path src/PSDocs.Azure -DestinationPath out/modules/PSDocs.Azure;
199199

200-
# Copy LICENSE from repo root
201-
Copy-Item -Path ../../LICENSE -Destination out/modules/PSDocs.Azure;
200+
# Copy LICENSE from repo root (use $PSScriptRoot for reliable path resolution)
201+
Copy-Item -Path (Join-Path $PSScriptRoot '../../LICENSE') -Destination out/modules/PSDocs.Azure;
202202

203-
# Copy third party notices from repo root
204-
Copy-Item -Path ../../ThirdPartyNotices.txt -Destination out/modules/PSDocs.Azure;
203+
# Copy third party notices from repo root (use $PSScriptRoot for reliable path resolution)
204+
Copy-Item -Path (Join-Path $PSScriptRoot '../../ThirdPartyNotices.txt') -Destination out/modules/PSDocs.Azure;
205205
}
206206

207207
task BuildDotNet {

0 commit comments

Comments
 (0)