Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 3 additions & 23 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ These instructions define how GitHub Copilot should assist with this project. Th

## File Structure

```txt
```plaintext
.azuredevops/ # Azure DevOps pipeline configuration and policy files.
.github/ # GitHub Actions workflow files and linter configuration files.
.nuget/ # NuGet package configuration files.
Expand All @@ -42,6 +42,7 @@ Audio/ # DirectX Tool Kit for Audio implementation files.
Inc/ # Public header files.
Src/ # Implementation header and source files.
Shaders/ # HLSL shader files.
skills/ # Published CoPilot skills for use by developers.
Tests/ # Tests are designed to be cloned from a separate repository at this location.
wiki/ # Local clone of the GitHub wiki documentation repository.
```
Expand Down Expand Up @@ -330,25 +331,4 @@ When reviewing documentation, do the following:

## Release Process

1. Ensure all changes are merged into the `main` branch and that all tests pass.
2. Git pull the local repository to ensure it is up to date with the `main` branch.
3. Run the PowerShell script `build\preparerelease.ps1` which will generate a topic branch for the release, update the version number in `CMakeLists.txt`, the `README.md` file, the release notes in the nuspec files, and create a stub in the `CHANGELOG.md` file for the new release.
4. Edit the `CHANGELOG.md` file to update it with a summary of changes.
5. Submit the topic branch for review and merge into `main` once approved. Allow the GitHub Actions workflows and the Azure DevOps pipelines to complete successfully before proceeding.
6. Run the PowerShell script `build\completerelease.ps1` which will set a tag on the project repo and the test repo, and create a release on GitHub with the release notes from `CHANGELOG.md`. Ensure you have set up GPG signing for your GitHub account so that the tags will be verified.
7. Git pull the local repository to ensure it is up to date with the `main` branch. Be sure to include `--tags`.
8. Push the `main` branch to the MSCodeHub mirror repository. Be sure to include `--tags`.
9. Create a PR on MSCodeHub from the `main` branch to the `release` branch.
10. Merge the PR on MSCodeHub to update the release branch, which will trigger the Azure DevOps pipeline to build the NuGet packages.
11. Edit the GitHub release and upload the signed binaries from the matching DirectXTK release to the release assets.
12. Download the GitHub source .zip archive from the release. Unzip and compare to the local repo to ensure it matches — keep in mind there may be some CR/LF differences. Run minisign on the .zip to generate a signature file, and upload the signature file to the release assets.
13. Validate the NuGet packages with <https://github.com/walbourn/directxtk-tutorials> by pushing the NuGet packages to a local Packages Source folder, and refreshing the NuGet packages from that folder. Then build using BuildAllSolutions.targets.
14. Run the PowerShell script `build\promotenuget.ps1` with the `-Release` parameter to promote the version to the Release view on the project-scoped ADO feed.
15. Run the MSCodeHub pipeline to publish the NuGet packages to nuget.org. The pipeline will automatically push the most recent package promoted to the Release view to nuget.org.
16. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository.
17. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXTK12 port in VCPKG with the new release version. This will edit the files in `ports\directxtk12`.
18. Test the VCPKG port using all appropriate triplets and features.
19. Run `.\vcpkg --x-add-version directxtk12` to update the VCPKG versioning history.
20. Submit a PR to the VCPKG repository to update the DirectXTK12 port back to the main GitHub repo. The PR will be reviewed and merged by the VCPKG maintainers.

> When fully completed, be sure to update the GitHub release with links to the matching NuGet packages, the VCPKG port, and the winget manifests for the tools.
The release process is documented in the [release skill](.github/skills/release/SKILL.md). Invoke the `release` skill for step-by-step guidance when performing a release.
70 changes: 70 additions & 0 deletions .github/skills/release/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: release
description: Guide for performing the DirectX Tool Kit for DirectX 12 release process. Use this skill when asked to help with releasing a new version, publishing packages, or updating ports.
---

# Release Process

## Prerequisites

- All changes merged into the `main` branch with all tests passing.
- GPG signing configured for your GitHub account (for verified tags).
- Access to the MSCodeHub mirror repository and Azure DevOps pipelines.
- Local repository:
- VCPKG at `d:\vcpkg` (synced with `main` branch)
- PATs will be needed for scripts that access GitHub and ADO.

<!-- markdownlint-disable MD029 -->
## Steps

### Phase 1: Prepare the Release

1. Git pull the local repository to ensure it is up to date with the `main` branch.
2. Run the PowerShell script `build\preparerelease.ps1` which will generate a topic branch for the release, update the version number in `CMakeLists.txt`, the `README.md` file, the release notes in the nuspec files, and create a stub in the `CHANGELOG.md` file for the new release.
3. Edit the `CHANGELOG.md` file to update it with a summary of changes.
4. Submit the topic branch for review and merge into `main` once approved. Allow the GitHub Actions workflows and the Azure DevOps pipelines to complete successfully before proceeding.

### Phase 2: Tag and Create GitHub Release

5. Run the PowerShell script `build\completerelease.ps1` which will set a tag on the project repo and the test repo, and create a release on GitHub with the release notes from `CHANGELOG.md`. Ensure you have set up GPG signing for your GitHub account so that the tags will be verified.
6. Git pull the local repository to ensure it is up to date with the `main` branch. Be sure to include `--tags`.

### Phase 3: MSCodeHub and Signed Binaries

7. Push the `main` branch to the MSCodeHub mirror repository. Be sure to include `--tags`.
8. Create a PR on MSCodeHub from the `main` branch to the `release` branch.
9. Merge the PR on MSCodeHub to update the release branch, which will trigger the Azure DevOps pipeline to build the NuGet packages.
10. Edit the GitHub release and upload the signed binaries from the matching DirectXTK release to the release assets (`xwbtool.exe`, `xwbtool_arm64.exe`, and `MakeSpriteFont.exe`).

### Phase 4: Source Archive Signing

11. Download the GitHub source .zip archive from the release. Unzip and compare to the local repo to ensure it matches — keep in mind there may be some CR/LF differences.
12. Run minisign on the .zip to generate a signature file, and upload the signature file to the release assets.

### Phase 5: NuGet Validation and Publishing

13. Validate the NuGet packages with <https://github.com/walbourn/directxtk-tutorials> by pushing the NuGet packages to a local Packages Source folder, and refreshing the NuGet packages from that folder. Then build using BuildAllSolutions.targets.
14. Run the PowerShell script `build\promotenuget.ps1 -Version <version> -Release` to promote the version to the Release view on the project-scoped ADO feed. The `-Version` parameter is required and should match the NuGet package version (e.g., `2026.6.2.1`).
15. Run the MSCodeHub pipeline to publish the NuGet packages to nuget.org. The pipeline will automatically push the most recent package promoted to the Release view to nuget.org.

### Phase 6: VCPKG Port Update

16. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository.
17. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXTK12 port in VCPKG with the new release version. This will edit the files in `ports\directxtk12`.
18. Test the VCPKG port using the script at `assets/vcpkgdxtk12.cmd` (in this skill folder). Copy it to `d:\vcpkg` and run from there after bootstrapping VCPKG.
19. Run `.\vcpkg x-add-version directxtk12` to update the VCPKG versioning history.
20. Submit a PR to the VCPKG repository to update the DirectXTK12 port back to the main GitHub repo. The PR will be reviewed and merged by the VCPKG maintainers.

### Phase 7: Finalize

When fully completed, be sure to update the GitHub release with links to the matching NuGet packages, the VCPKG port, and the winget manifests for the tools.

## Key Scripts

| Script | Purpose |
| --- | --- |
| `build\preparerelease.ps1` | Creates topic branch, updates version numbers and changelog stub |
| `build\completerelease.ps1` | Sets tags, creates GitHub release from changelog |
| `build\promotenuget.ps1` | Promotes NuGet package to Release view on ADO feed |
| `assets\vcpkgdxtk12.cmd` | Tests VCPKG port across all triplets and features |
| `build\updatevcpkg.ps1` | Updates DirectXTK12 VCPKG port files |
179 changes: 179 additions & 0 deletions .github/skills/release/assets/vcpkgdxtk12.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
@set VCPKG_BINARY_SOURCES=clear
@set VCPKG_ROOT=%cd%
@if %1.==xbox. goto xbox
@if %1.==clang. goto clang
.\vcpkg install directxtk12[core]:x86-windows
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2-9]:x86-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:x86-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xinput]:x86-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[spectre]:x86-windows-static-md --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x86-windows-static
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x86-windows-static-md
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:x86-windows-static-md --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[core]:x64-windows
@if errorlevel 1 goto error
.\vcpkg install directxtk12[tools]:x64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2-9]:x64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:x64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xinput]:x64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[gameinput]:x64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[spectre]:x64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-windows-static
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-windows-static-md
@if errorlevel 1 goto error
.\vcpkg install directxtk12[gameinput]:x64-windows-static-md --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:x64-windows-static-md --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[core]:arm64-windows
@if errorlevel 1 goto error
.\vcpkg install directxtk12[tools]:arm64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xinput]:arm64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:arm64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[spectre]:arm64-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12:arm64-windows-static
@if errorlevel 1 goto error
.\vcpkg install directxtk12:arm64-windows-static-md
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:arm64-windows-static-md --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[core]:arm64ec-windows
@if errorlevel 1 goto error
.\vcpkg install directxtk12[tools]:arm64ec-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:arm64ec-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[spectre]:arm64ec-windows --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x86-uwp
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-uwp
@if errorlevel 1 goto error
.\vcpkg install directxtk12:arm64-uwp
@if errorlevel 1 goto error
@where /Q x86_64-w64-mingw32-g++.exe
@if errorlevel 1 goto skipgcc64
.\vcpkg install directxtk12:x64-mingw-dynamic
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:x64-mingw-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[gameinput]:x64-mingw-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[tools]:x64-mingw-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-mingw-static
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:x64-mingw-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xinput]:x64-mingw-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[gameinput]:x64-mingw-static --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[tools]:x64-mingw-static --recurse
@if errorlevel 1 goto error
:skipgcc64
@where /Q i686-w64-mingw32-g++.exe
@if errorlevel 1 goto skipgcc32
.\vcpkg install directxtk12:x86-mingw-dynamic
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:x86-mingw-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xinput]:x86-mingw-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x86-mingw-static
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:x86-mingw-static --recurse
@if errorlevel 1 goto error
:skipgcc32
goto finish
:xbox
.\vcpkg install directxtk12:x64-xbox-scarlett
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-xbox-scarlett-static
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-xbox-xboxone
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-xbox-xboxone-static
@if errorlevel 1 goto error
@goto finish
:clang
.\vcpkg install directxtk12[core]:x64-clangcl-dynamic
@if errorlevel 1 goto error
.\vcpkg install directxtk12[tools]:x64-clangcl-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2-9]:x64-clangcl-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:x64-clangcl-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-clangcl-static
@if errorlevel 1 goto error
.\vcpkg install directxtk12[core]:arm64-clangcl-dynamic
@if errorlevel 1 goto error
.\vcpkg install directxtk12[tools]:arm64-clangcl-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12[xaudio2redist]:arm64-clangcl-dynamic --recurse
@if errorlevel 1 goto error
.\vcpkg install directxtk12:arm64-clangcl-static
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-clangcl-uwp
@if errorlevel 1 goto error
.\vcpkg install directxtk12:arm64-clangcl-uwp
@if errorlevel 1 goto error
@if "%GXDKLatest%."=="." goto finish
.\vcpkg install directxtk12:x64-clangcl-scarlett
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-clangcl-scarlett-static
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-clangcl-xboxone
@if errorlevel 1 goto error
.\vcpkg install directxtk12:x64-clangcl-xboxone-static
@if errorlevel 1 goto error
:finish
@echo SUCCEEDED
@if %1.==xbox. goto eof
@if %1.==clang. goto eof
@where /Q x86_64-w64-mingw32-g++.exe
@if NOT errorlevel 1 goto gcc64
@echo .
@echo . Run for MinGW64
@echo . .\vcpkg install directxtk12:x64-mingw-dynamic
@echo . .\vcpkg install directxtk12[xaudio2redist]:x64-mingw-dynamic --recurse
@echo . .\vcpkg install directxtk12[gameinput]:x64-mingw-dynamic --recurse
@echo . .\vcpkg install directxtk12[tools]:x64-mingw-dynamic --recurse
@echo . .\vcpkg install directxtk12:x64-mingw-static
@echo . .\vcpkg install directxtk12[xaudio2redist]:x64-mingw-static --recurse
@echo . .\vcpkg install directxtk12[gameinput]:x64-mingw-static --recurse
@echo . .\vcpkg install directxtk12[tools]:x64-mingw-static --recurse
:gcc64
@where /Q i686-w64-mingw32-g++.exe
@if NOT errorlevel 1 goto gcc32
@echo .
@echo . Run for MinGW32
@echo . .\vcpkg install directxtk12:x86-mingw-dynamic
@echo . .\vcpkg install directxtk12[xaudio2redist]:x86-mingw-dynamic --recurse
@echo . .\vcpkg install directxtk12:x86-mingw-static
@echo . .\vcpkg install directxtk12[xaudio2redist]:x86-mingw-static --recurse
:gcc32
@goto eof
:error
@echo FAILED
:eof
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0

- name: Initialize CodeQL
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
languages: c-cpp
build-mode: manual
Expand All @@ -75,6 +75,6 @@ jobs:
run: cmake --build out\build\x64-Debug

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
category: "/language:c-cpp"
2 changes: 1 addition & 1 deletion .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ jobs:

# Upload SARIF file to GitHub Code Scanning Alerts
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5
uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ Bin
/CMakeUserPresets.json
/build/vcpkg_installed
/build/obj
!**/skills/**
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,28 @@ These components are designed to work without requiring any content from the leg

* Contains miscellaneous build files and scripts.

* ``skills\``

* Contains published CoPilot skills for use by developers.

> MakeSpriteFont and XWBTool can be found in the [DirectX Tool Kit for DirectX 11](https://github.com/microsoft/DirectXTK). Audio, GamePad, Keyboard, Mouse, and SimpleMath are identical between both versions of the toolkit.

## Documentation

Documentation is available on the [GitHub wiki](https://github.com/Microsoft/DirectXTK12/wiki).

## CoPilot Usage

For CoPilot CLI assistance with using DirectX Tool Kit, try:

```bash
winget install GitHub.Copilot
winget install GitHub.cli
gh skill install microsoft/directxtk12
copilot
/skills list
```

## Notices

All content and source code for this package are subject to the terms of the [MIT License](https://github.com/microsoft/DirectXTK12/blob/main/LICENSE).
Expand Down
Loading
Loading