Copilot instructions
.github/instructions/build-configuration-guide.instructions.mdCopilot instructions
Quality
74/100
Scores the file, not the repository.Length
424 words
14 headings · 7 code blocksRepository
55k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.12345678910# Build Configuration Guide1112## Choosing the Right Configuration1314### For Testing1516**Use: Default (Debug)**1718```yaml19- name: Build for Testing20 shell: pwsh21 run: |22 Import-Module ./tools/ci.psm123 Start-PSBuild24```2526**Why Debug:**27- Includes debugging symbols28- Better error messages29- Faster build times30- Suitable for xUnit and Pester tests3132**Do NOT use:**33- `-Configuration 'Release'` (unnecessary for tests)34- `-ReleaseTag` (not needed for tests)35- `-CI` (unless you specifically need Pester module)3637### For Release/Packaging3839**Use: Release with version tag and public NuGet feeds**4041```yaml42- name: Build for Release43 shell: pwsh44 run: |45 Import-Module ./build.psm146 Import-Module ./tools/ci.psm147 Switch-PSNugetConfig -Source Public48 $releaseTag = Get-ReleaseTag49 Start-PSBuild -Configuration 'Release' -ReleaseTag $releaseTag50```5152**Why Release:**53- Optimized binaries54- No debug symbols (smaller size)55- Production-ready5657**Why Switch-PSNugetConfig -Source Public:**58- Switches NuGet package sources to public feeds (nuget.org and public Azure DevOps feeds)59- Required for CI/CD environments that don't have access to private feeds60- Uses publicly available packages instead of Microsoft internal feeds6162### For Code Coverage6364**Use: CodeCoverage configuration**6566```yaml67- name: Build with Coverage68 shell: pwsh69 run: |70 Import-Module ./tools/ci.psm171 Start-PSBuild -Configuration 'CodeCoverage'72```7374## Platform Considerations7576### All Platforms7778Same commands work across Linux, Windows, and macOS:7980```yaml81strategy:82 matrix:83 os: [ubuntu-latest, windows-latest, macos-latest]84runs-on: ${{ matrix.os }}85steps:86 - name: Build PowerShell87 shell: pwsh88 run: |89 Import-Module ./tools/ci.psm190 Start-PSBuild91```9293### Output Locations9495**Linux/macOS:**96```97src/powershell-unix/bin/Debug/<netversion>/<runtime>/publish/98```99100**Windows:**101```102src/powershell-win-core/bin/Debug/<netversion>/<runtime>/publish/103```104105## Best Practices1061071. Use default configuration for testing1082. Avoid redundant parameters1093. Match configuration to purpose1104. Use `-CI` only when needed1115. Always specify `-ReleaseTag` for release or packaging builds1126. Use `Switch-PSNugetConfig -Source Public` in CI/CD for release builds113114## NuGet Feed Configuration115116### Switch-PSNugetConfig117118The `Switch-PSNugetConfig` function in `build.psm1` manages NuGet package source configuration.119120**Available Sources:**121122- **Public**: Uses public feeds (nuget.org and public Azure DevOps feeds)123 - Required for: CI/CD environments, public builds, packaging124 - Does not require authentication125126- **Private**: Uses internal PowerShell team feeds127 - Required for: Internal development with preview packages128 - Requires authentication credentials129130- **NuGetOnly**: Uses only nuget.org131 - Required for: Minimal dependency scenarios132133**Usage:**134135```powershell136# Switch to public feeds (most common for CI/CD)137Switch-PSNugetConfig -Source Public138139# Switch to private feeds with authentication140Switch-PSNugetConfig -Source Private -UserName $userName -ClearTextPAT $pat141142# Switch to nuget.org only143Switch-PSNugetConfig -Source NuGetOnly144```145146**When to Use:**147148- **Always use `-Source Public`** before building in CI/CD workflows149- Use before any build that will create packages for distribution150- Use in forks or environments without access to Microsoft internal feeds151
Also in PowerShell/PowerShell
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| PowerShell/PowerShell.github/instructions/code-review-branch-strategy.instructions.md · 55k | Copilot instructions | lint-formatstyletypesgit+1 | 62/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/instruction-file-format.instructions.md · 55k | Copilot instructions | buildlint-formatstylearch+3 | 76/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/pester-set-itresult-pattern.instructions.md · 55k | Copilot instructions | setupstylearch | 62/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/powershell-automatic-variables.instructions.md · 55k | Copilot instructions | stylearchgitdeployment+1 | 69/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/pester-test-status-and-working-meaning.instructions.md · 55k | Copilot instructions | teststyle | 54/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/build-and-packaging-steps.instructions.md · 55k | Copilot instructions | buildagent-behaviour | 58/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/build-checkout-prerequisites.instructions.md · 55k | Copilot instructions | setupbuildstylearch+1 | 81/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/log-grouping-guidelines.instructions.md · 55k | Copilot instructions | buildtestdo-not | 77/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/onebranch-condition-syntax.instructions.md · 55k | Copilot instructions | buildstylearchdeployment+1 | 73/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/onebranch-restore-phase-pattern.instructions.md · 55k | Copilot instructions | arch | 54/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/onebranch-signing-configuration.instructions.md · 55k | Copilot instructions | buildstyledeployment | 62/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/powershell-module-organization.instructions.md · 55k | Copilot instructions | buildteststylearch+2 | 69/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/powershell-parameter-naming.instructions.md · 55k | Copilot instructions | styledo-not | 65/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/publishing-pester-result.instructions.md · 55k | Copilot instructions | testlint-formatstylearch+3 | 69/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/script-module-file-format.instructions.md · 55k | Copilot instructions | lint-format | 54/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/start-native-execution.instructions.md · 55k | Copilot instructions | buildstylearchgit+1 | 86/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/start-psbuild-basics.instructions.md · 55k | Copilot instructions | buildtesting-strategydeploymentagent-behaviour | 54/100 | 3 days ago | |
| PowerShell/PowerShell.github/instructions/troubleshooting-builds.instructions.md · 55k | Copilot instructions | buildgitdeployment | 54/100 | 3 days ago |
Diff against .github/instructions/code-review-branch-strategy.instructions.md Diff against .github/instructions/instruction-file-format.instructions.md Diff against .github/instructions/pester-set-itresult-pattern.instructions.md Diff against .github/instructions/powershell-automatic-variables.instructions.md Diff against .github/instructions/pester-test-status-and-working-meaning.instructions.md Diff against .github/instructions/build-and-packaging-steps.instructions.md Diff against .github/instructions/build-checkout-prerequisites.instructions.md Diff against .github/instructions/log-grouping-guidelines.instructions.md Diff against .github/instructions/onebranch-condition-syntax.instructions.md Diff against .github/instructions/onebranch-restore-phase-pattern.instructions.md Diff against .github/instructions/onebranch-signing-configuration.instructions.md Diff against .github/instructions/powershell-module-organization.instructions.md Diff against .github/instructions/powershell-parameter-naming.instructions.md Diff against .github/instructions/publishing-pester-result.instructions.md Diff against .github/instructions/script-module-file-format.instructions.md Diff against .github/instructions/start-native-execution.instructions.md Diff against .github/instructions/start-psbuild-basics.instructions.md Diff against .github/instructions/troubleshooting-builds.instructions.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 3 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| pytorch/pytorch.github/copilot-instructions.md · 102k | Copilot instructions | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| dotnet/roslyn.github/instructions/Compiler.instructions.md · 21k | Copilot instructions | buildteststylearch+3 | 99/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| hiyouga/LlamaFactory.github/copilot-instructions.md · 74k | Copilot instructions | setupbuildtestlint-format+5 | 97/100 | 2 days ago | |
| rtk-ai/rtk.github/copilot-instructions.md · 75k | Copilot instructions | buildtestlint-formatstyle+2 | 97/100 | 3 days ago | |
| dotnet/roslyn.github/copilot-instructions.md · 21k | Copilot instructions | buildteststylearch+3 | 97/100 | 3 days ago |
