Shared GitHub Actions used across KyleSpicer's projects. Each is a composite
action; reference one from a workflow by its path on main:
uses: KyleSpicer/GitOps/actions/<name>@mainPinning to @main means a push to this repository changes the action for
every workflow that uses it, immediately. Pin to a tag or commit SHA instead
if you need a workflow to stay fixed.
- Available actions - overview table
- locate-msbuild - find
MSBuild.exe - msbuild-release - build a VS solution or project
- upload-build - upload an artifact
- userguide-pdf - render and upload
userguide.pdf
Each row links to that action's section below; the section heading links to
its source action.yml.
| Action | Purpose | Runner OS |
|---|---|---|
locate-msbuild |
Find the newest MSBuild.exe via vswhere |
Windows |
msbuild-release |
Build a Visual Studio solution or project | Windows |
upload-build |
Upload build output as a workflow artifact | Any |
userguide-pdf |
Render Docs/userguide.md to a PDF and upload it |
Any |
Resolves the path to the newest MSBuild.exe on the runner using vswhere,
preferring the 64-bit build to avoid WOW64 path redirection. msbuild-release
calls this itself, so you only need it directly to run MSBuild your own way.
Outputs: msbuild-path - the resolved path. Also exported as the
MSBUILD environment variable for later steps.
Windows only: uses PowerShell and vswhere.
- id: msbuild
uses: KyleSpicer/GitOps/actions/locate-msbuild@main
- shell: powershell
run: & "${{ steps.msbuild.outputs.msbuild-path }}" MyApp.sln /p:Configuration=ReleaseBuilds a .sln, .slnx, or .vcxproj with /m /nologo /restore. Locates
MSBuild via locate-msbuild first.
| Input | Required | Default | Description |
|---|---|---|---|
project |
yes | Path to the .sln, .slnx, or .vcxproj, relative to working-directory |
|
configuration |
no | Release |
Debug or Release |
platform |
no | x64 |
x64, x86, or Win32 |
working-directory |
no | . |
Directory to build from |
extra-args |
no | "" |
Extra MSBuild arguments, space separated |
Outputs: msbuild-path - the MSBuild used.
Windows only: uses PowerShell and MSBuild.
- uses: KyleSpicer/GitOps/actions/msbuild-release@main
with:
project: MyApp/MyApp.slnx
configuration: Release
platform: x64Uploads files, folders, or globs as a workflow artifact, wrapping
actions/upload-artifact@v7. Any file type. A path that matches nothing
fails the step.
| Input | Required | Default | Description |
|---|---|---|---|
name |
yes | Artifact name, unique within the workflow run | |
path |
yes | Files, folders, or globs, one per line, relative to the repo root. ! prefix excludes |
|
retention-days |
no | 7 |
Days to keep the artifact |
Outputs: artifact-id - the uploaded artifact's ID.
Runs on any runner OS (no shell steps). actions/upload-artifact runs on
the Node.js bundled with the GitHub runner, so nothing extra is needed.
- uses: KyleSpicer/GitOps/actions/upload-build@main
with:
name: myapp-windows-x64
path: |
build/MyApp.exe
docs/guide.pdf
!**/*.pdbArtifacts expire (the repository's retention setting sets the maximum;
retention-days can only shorten it). For downloads that should never
expire, attach the files to a GitHub Release instead.
Renders a repository's user guide to userguide.pdf and uploads it with
upload-build. Looks for Docs/userguide.md, then docs/userguide.md.
Images the guide references, such as an image.png beside it, must exist,
or the step fails and names the missing file. Links within the guide, like a
table of contents, become working links and PDF bookmarks.
| Input | Required | Default | Description |
|---|---|---|---|
name |
no | userguide |
Artifact name, unique within the workflow run |
output |
no | userguide.pdf |
PDF to write, relative to the repo root |
guide |
no | "" |
Guide to render instead of searching Docs/ and docs/ |
paper-size |
no | Letter |
Page size, such as Letter or A4 |
upload |
no | "true" |
"false" renders only, for example to attach the PDF to a release |
retention-days |
no | 7 |
Days to keep the artifact |
Outputs: pdf-path - absolute path of the rendered PDF.
Runs on any runner OS. Needs Python 3.10 or newer on the PATH, as python
on Windows and python3 elsewhere, plus network access to PyPI. On first use
it installs a pinned renderer (markdown-pdf with PyMuPDF, about 70 MB) into a
private virtual environment in the runner's temp folder and reuses it after
that; the runner's own Python is never changed. A stock Debian or Ubuntu
Python, which lacks pip, works too.
- uses: actions/checkout@v7
- uses: KyleSpicer/GitOps/actions/userguide-pdf@main