Skip to content

Commit

Permalink
Changing SDK detectin logic
Browse files Browse the repository at this point in the history
  • Loading branch information
timheuer committed Nov 1, 2023
1 parent dc48d71 commit ac8059a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/templatepack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
<Version>1.1.6</Version>
<Version>1.1.7</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/templates/.template.config/dotnetcli.host.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"sdk-version": {
"longName": "sdk-version",
"shortName": "sdk"
},
"dotnet-cli-version": {
"isHidden": "true"
}
},
"usageExamples": [
Expand Down
41 changes: 37 additions & 4 deletions src/templates/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
],
"identity": "TimHeuer.GitHubWorkflows",
"name": "GitHub Actions workflow for .NET Core",
"generatorVersions": "[1.0.0.0-*)",
"description": "A workflow file for .NET Core apps to use in GitHub Actions",
"shortName": "workflow",
"sourceName": "ci_build",
Expand All @@ -23,17 +24,49 @@
},
"defaultName": "build",
"symbols": {
"HostIdentifier": {
"type": "bind",
"binding": "HostIdentifier"
},
"sdk-version": {
"description": "The SDK version for the generated workflow",
"replaces": "Workflow.SDKVersion",
"type": "parameter",
"defaultValue": "7.0.x"
"datatype": "string",
"displayName": "SDK version"
},
"branch": {
"description": "The branch for the workflow to operate on",
"replaces": "Workflow.Branch",
"type": "parameter",
"defaultValue": "main"
"defaultValue": "main",
"datatype": "string",
"displayName": "Branch"
},
"dotnet-cli-version": {
"type": "parameter",
"datatype": "string",
"displayName": "dotnet CLI version"
},
"CombinedVersion": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "sdk-version",
"fallbackVariableName": "dotnet-cli-version"
},
"replaces": "Workflow.SDKVersion"
}
},
"postActions": [
{
"id": "open-file",
"description": "Open the workflow file in the editor",
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
"args": {
"files": "0"
},
"actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6",
"continueOnError": true
}
}
]
}

0 comments on commit ac8059a

Please sign in to comment.