Skip to content

Commit

Permalink
🚧Initial development (#3)
Browse files Browse the repository at this point in the history
* Start work for issue #2

* config: setup kd-admin tool with various settings

* docs: create initial release notes file

* config: set version

* config: improve nuget pkg setup

* chore: complete empty template setup

* chore: create template for simple texture rendering and keyboard input

* config: update solution file

* ide: save run config for velrendertexture template project

* ide: update project specific settings

* ide: add settings.json file for vscode

* ci: create build status check workflow for the VelEmpty template project

* ci: create build status check workflow for VelRenderTexture template project

* config: add license and readme to the nuget package

* docs: update readme

* ide: update vscode settings

* ci: create release workflow

* chore: improve templates
  • Loading branch information
CalvinWilkinson authored Jan 1, 2025
1 parent dfe5183 commit 258657b
Show file tree
Hide file tree
Showing 27 changed files with 694 additions and 13 deletions.
145 changes: 145 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: 🚀Release
run-name: ${{ vars.PROJECT_NAME }} Production Release ${{ inputs.dry-run == true && '(Dry Run)' || '' }}


defaults:
run:
shell: pwsh


on:
workflow_dispatch:
inputs:
dry-run:
description: Dry Run - Check to run the workflow without creating a release.
required: false
default: false
type: boolean


jobs:
validate_version:
name: Validate Version
uses: KinsonDigital/Infrastructure/.github/workflows/validate-csharp-version.yml@v14.1.0
with:
project-name: "${{ vars.PROJECT_NAME }}"
release-type: "Production"
secrets:
cicd-pat: "${{ secrets.CICD_TOKEN }}"

get_release_notes_path:
name: Get Release Notes Dir Path
runs-on: ubuntu-latest
outputs:
release-notes-dir-path: ${{ steps.get-dir-path.outputs.release-notes-dir-path }}
steps:
- name: Get Dir Path
id: get-dir-path
run: |
$dirPath = "${{ vars.PROD_RELATIVE_RELEASE_NOTES_DIR_PATH }}";
"release-notes-dir-path=$dirPath" >> $env:GITHUB_OUTPUT;
build_vel_empty_template_proj:
name: Build VelEmpty Proj Template
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "${{ vars.NET_SDK_VERSION }}"

- name: Build Project
run: |
$projFilePath = "${{ github.workspace }}/VelaptorTemplates/Templates/VelEmpty/VelEmpty.csproj";
dotnet build $projFilePath -c Release;
build_vel_render_texture_proj:
name: Build VelRenderTexture Proj Template
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "${{ vars.NET_SDK_VERSION }}"

- name: Build Project
run: |
$projFilePath = "${{ github.workspace }}/VelaptorTemplates/Templates/VelRenderTexture/VelRenderTexture.csproj";
dotnet build $projFilePath -c Release;
run_release:
name: Performing Production Release of ${{ vars.PROJECT_NAME }}
needs: [validate_version, get_release_notes_path, build_vel_empty_template_proj, build_vel_render_texture_proj]
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "${{ vars.NET_SDK_VERSION }}"

- name: Setup Nuget
uses: NuGet/setup-nuget@v2

- name: Create Nuget Package
run: |
dotnet pack `
"${{ github.workspace }}/${{ vars.PROJECT_NAME }}/${{ vars.PROJECT_NAME }}.csproj" `
-o "${{ github.workspace }}" `
-c Release `
-p:IncludeSymbols=true;
- name: Publish Nuget Package
if: ${{ inputs.dry-run == false }}
run: |
$version = "${{ needs.validate_version.outputs.version }}";
$version = $version.StartsWith("v") ? $version.Substring(1) : $version;
# Push the nuget package
dotnet nuget push `
"${{ github.workspace }}/${{ vars.ORGANIZATION_NAME }}.${{ vars.PROJECT_NAME }}.$version.nupkg" `
--api-key ${{ secrets.NUGET_ORG_API_KEY }} `
--source https://api.nuget.org/v3/index.json;
- name: Create GitHub Release ${{ inputs.dry-run == true && '(Dry Run)' || '' }}
if: ${{ inputs.dry-run == false }}
uses: ncipollo/release-action@v1
with:
name: "🚀Production - ${{ needs.validate_version.outputs.version }}"
tag: ${{ needs.validate_version.outputs.version }}
owner: ${{ vars.ORGANIZATION_NAME }}
repo: ${{ vars.PROJECT_NAME }}
bodyFile: "${{ github.workspace }}/ReleaseNotes/ProductionReleases/Release-Notes-${{ needs.validate_version.outputs.version }}.md"
artifacts: "${{ github.workspace }}/ReleaseNotes/ProductionReleases/Release-Notes-${{ needs.validate_version.outputs.version }}.md"
prerelease: false

- name: Set Up Deno
uses: denoland/setup-deno@v2
with:
deno-version: ${{ vars.DENO_VERSION }}

- name: Create Script URL
id: script-url
run: |
# Construct the URL to the organizations CICD scripts
$url = "${{ vars.SCRIPT_BASE_URL }}/${{ vars.CICD_SCRIPTS_VERSION }}/${{ vars.SCRIPT_RELATIVE_DIR_PATH }}";
$url = $url.Replace("\", "/").Replace("//", "/");
$url = $url.EndsWith("/") ? $url.Substring(0, $url.Length - 1) : $url;
Write-Host "::notice::DotNet Lib Release Script URL: $url";
"url=$url" >> "$env:GITHUB_OUTPUT";
- name: Close Milestone
if: ${{ inputs.dry-run == false }}
env:
MILESTONE_NAME: "${{ needs.validate_version.outputs.version }}"
GITHUB_TOKEN: "${{ secrets.CICD_TOKEN }}"
run: deno run -ERN "${{ steps.script-url.outputs.url }}/close-milestone.ts";
31 changes: 31 additions & 0 deletions .github/workflows/velempty-build-status-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ✅Build Status Check
run-name: ✅Build Status Check (${{ github.base_ref }} branch)


defaults:
run:
shell: pwsh


on:
pull_request:
branches: [main]


jobs:
build_vel_empty_status_check:
name: VelEmpty Proj Template Build Status Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "${{ vars.NET_SDK_VERSION }}"

- name: Build Project
run: |
$projFilePath = "${{ github.workspace }}/VelaptorTemplates/Templates/VelEmpty/VelEmpty.csproj";
dotnet build $projFilePath -c Release;
31 changes: 31 additions & 0 deletions .github/workflows/velrendertexture-build-status-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ✅Build Status Check
run-name: ✅Build Status Check (${{ github.base_ref }} branch)


defaults:
run:
shell: pwsh


on:
pull_request:
branches: [main]


jobs:
build_vel_render_texture_status_check:
name: VelRenderTexture Proj Template Build Status Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "${{ vars.NET_SDK_VERSION }}"

- name: Build Project
run: |
$projFilePath = "${{ github.workspace }}/VelaptorTemplates/Templates/VelRenderTexture/VelRenderTexture.csproj";
dotnet build $projFilePath -c Release;
20 changes: 20 additions & 0 deletions .run/VelRenderTexture.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="VelRenderTexture" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/VelaptorTemplates/Templates/VelRenderTexture/bin/Debug/net9.0/VelRenderTexture.exe" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/VelaptorTemplates/Templates/VelRenderTexture/bin/Debug/net9.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/VelaptorTemplates/Templates/VelRenderTexture/VelRenderTexture.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value="net9.0" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
27 changes: 27 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
".idea": true,
".run": true,
},
"cSpell.words": [
"CICD",
"denoland",
"gamedev",
"Kinson",
"ncipollo",
"nupkg",
"pwsh",
"REPONAME",
"Velaptor"
],
"[github-actions-workflow]": {
"editor.tabSize": 2,
"editor.insertSpaces": true
}
}
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# VelaptorTemplates
# Velaptor Templates

Various project templates for game development using [Velaptor](https://github.com/kinsondigital/velaptor).

For documentation on how to build games using Velaptor, please visit the [Velaptor Documentation](https://docs.velaptor.io).

Installing the templates can be done using the following dotnet cli command:
```bash
dotnet new install KinsonDigital.VelaptorTemplates
```

To create an empty bare-bones Velaptor project, run the following command in your directory of choice:
```bash
dotnet new VelEmpty --name <your-proj-name-here>
```

To create a project with basic setup to render a single texture with keyboard input based movement,
run the following command in your directory of choice:
```bash
dotnet new VelRenderTexture --name <your-proj-name-here>
```
5 changes: 5 additions & 0 deletions ReleaseNotes/ProductionReleases/Release-Notes-v1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h1 align="center" style="color: mediumseagreen;font-weight: bold;">
VelaptorTemplates Production Release Notes - v1.0.0
</h1>

Initial Release!!
19 changes: 18 additions & 1 deletion VelaptorTemplates.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
#
#
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VelaptorTemplates", "VelaptorTemplates\VelaptorTemplates.csproj", "{D85354EC-A891-44B1-829D-EDDD592693DF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VelaptorTemplates", "VelaptorTemplates", "{86B02555-09AE-4020-A13E-391E432A2821}"
Expand All @@ -9,6 +9,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VelEmpty", "VelaptorTemplates\Templates\VelEmpty\VelEmpty.csproj", "{2AA3B934-D685-4C45-9F80-4B5C0AF96CB5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VelRenderTexture", "VelaptorTemplates\Templates\VelRenderTexture\VelRenderTexture.csproj", "{2F8A49F7-1DF4-4D15-9649-6111ABD91BF4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{1A2DFA7D-1B2B-4CF4-A292-15419F2579C7}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
create-pr.ps1 = create-pr.ps1
LICENSE = LICENSE
prepare-for-release.ps1 = prepare-for-release.ps1
prod-prepare-release-template.md = prod-prepare-release-template.md
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -23,10 +35,15 @@ Global
{2AA3B934-D685-4C45-9F80-4B5C0AF96CB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AA3B934-D685-4C45-9F80-4B5C0AF96CB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AA3B934-D685-4C45-9F80-4B5C0AF96CB5}.Release|Any CPU.Build.0 = Release|Any CPU
{2F8A49F7-1DF4-4D15-9649-6111ABD91BF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F8A49F7-1DF4-4D15-9649-6111ABD91BF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F8A49F7-1DF4-4D15-9649-6111ABD91BF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F8A49F7-1DF4-4D15-9649-6111ABD91BF4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D85354EC-A891-44B1-829D-EDDD592693DF} = {86B02555-09AE-4020-A13E-391E432A2821}
{BCE36EA8-08F6-44AE-83CF-D0F00F6F9962} = {86B02555-09AE-4020-A13E-391E432A2821}
{2AA3B934-D685-4C45-9F80-4B5C0AF96CB5} = {BCE36EA8-08F6-44AE-83CF-D0F00F6F9962}
{2F8A49F7-1DF4-4D15-9649-6111ABD91BF4} = {BCE36EA8-08F6-44AE-83CF-D0F00F6F9962}
EndGlobalSection
EndGlobal
5 changes: 5 additions & 0 deletions VelaptorTemplates.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=batcher/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=gamedev/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=kinson/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=velaptor/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://json.schemastore.org/template",
"author": "KinsonDigital",
"classifications": ["velaptor", "gamedev", "game-dev", "game dev", "velaptor templates"],
"identity": "VelaptorTemplates.VelEmpty",
"name": "Empty Velaptor Project",
"shortName": "VelEmpty",
"sourceName": "VelEmpty",
"preferNameDirectory": true
}
Loading

0 comments on commit 258657b

Please sign in to comment.