Skip to content

Commit

Permalink
First draft
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real committed Jan 20, 2022
1 parent 056c558 commit c4d1e67
Show file tree
Hide file tree
Showing 81 changed files with 1,124 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 📝 Release Drafter

on:
push:
branches:
- main
jobs:
update:
name: ⏫ Update
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@main
with:
fetch-depth: 0

- name: ⏭️ Get next version
id: version
run: |
declare -i newpost
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
latestpre=$(echo "$latest" | awk '{split($0,a,"."); print a[1] "." a[2]}')
datepre=$(date --utc '+%y.%-W')
if [[ "$latestpre" == "$datepre" ]]; then
latestpost=$(echo "$latest" | awk '{split($0,a,"."); print a[3]}')
newpost=$latestpost+1
else
newpost=0
fi
echo Current version: $latest
echo New target version: $datepre.$newpost
echo "::set-output name=version::$datepre.$newpost"
- name: 🏃 Run Release Drafter
uses: release-drafter/release-drafter@v5
with:
tag: ${{ steps.version.outputs.version }}
name: ${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/tags_nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#### Build and tests all pushes, also code coverage
name: 📦 Publish nuget
on:
release:
types:
- released
- prereleased
jobs:
deploy_nuget:
name: 📦 publish nuget packages
runs-on: ubuntu-latest
environment: CI - release environment
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main
with:
fetch-depth: 0

- name: ⏭️ Get next version
id: version
run: |
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
echo Current version: $latest
echo "::set-output name=version::$latest"
- name: 🥅 Install .Net 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x" # SDK Version

- name: 🎁 Pack AppModel
run: dotnet pack . --configuration Release -p:PackageVersion=${{ steps.version.outputs.version }}
- name: 📨 Push to nuget
run: dotnet nuget push **/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --no-symbols true
13 changes: 13 additions & 0 deletions .idea/.idea.ProjectTemplate/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.idea.ProjectTemplate/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/.idea.ProjectTemplate/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/.idea.ProjectTemplate/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.ProjectTemplate/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/.idea.csproj-template/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/.idea.csproj-template/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/.idea.csproj-template/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.csproj-template/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions ProjectTemplate.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetDaemon.Templates.Project", "src\NetDaemon.Templates.Project\NetDaemon.Templates.Project.csproj", "{5E4B33AA-E4DC-416A-A8A1-DF91B7F3AAFA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5E4B33AA-E4DC-416A-A8A1-DF91B7F3AAFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E4B33AA-E4DC-416A-A8A1-DF91B7F3AAFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E4B33AA-E4DC-416A-A8A1-DF91B7F3AAFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E4B33AA-E4DC-416A-A8A1-DF91B7F3AAFA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
27 changes: 27 additions & 0 deletions src/NetDaemon.Templates.Project/NetDaemon.Templates.Project.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>JoySoftware.NetDaemon.Templates.Project</PackageId>
<PackageVersion>22.1.0</PackageVersion>
<PackageType>Template</PackageType>
<Title>Netdaemon project template for dotnet cli</Title>
<Authors>helto4real</Authors>
<Description>This package provides project templates for the dotnet cli</Description>
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>

<ItemGroup>
<Folder Include="templates\netdaemon\apps\HelloWorld" />
</ItemGroup>

<ItemGroup>
<Compile Include="templates\netdaemon\apps\GlobalUsings.cs" />
<Compile Include="templates\netdaemon\program.cs" />
<Content Include="templates\**\*" Exclude="templates\**\bin\**;templates\**\obj\**" />
<Compile Remove="**\*" />
</ItemGroup>

</Project>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"NetDaemon.Templates.Project/1.0.0": {
"runtime": {
"NetDaemon.Templates.Project.dll": {}
}
}
}
},
"libraries": {
"NetDaemon.Templates.Project/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>JoySoftware.NetDaemon.Templates.Project</id>
<version>22.1.0</version>
<title>Netdaemon project template for dotnet cli</title>
<authors>helto4real</authors>
<description>This package provides project templates for the dotnet cli</description>
<packageTypes>
<packageType name="Template" />
</packageTypes>
<dependencies>
<group targetFramework="net6.0" />
</dependencies>
<contentFiles>
<files include="any/net6.0/templates/netdaemon/.devcontainer/devcontainer.json" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/.devcontainer/Dockerfile" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/.gitattributes" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/.gitignore" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/.vscode/daemon.code-snippets" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/.vscode/launch.json" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/.vscode/tasks.json" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/appsettings.json" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/apps/AppModel/YamlConfigApp/YamlConfigApp.cs" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/apps/AppModel/YamlConfigApp/YamlConfigApp.yaml" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/apps/Extensions/Scheduling/Scheduling.cs" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/apps/GlobalUsings.cs" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/apps/HassModel/HelloWorld/HelloWorld.cs" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/apps/HassModel/LightOnMovement/LightOnMovement.cs" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/daemonapp.csproj" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/Properties/launchSettings.json" buildAction="Content" />
<files include="any/net6.0/templates/netdaemon/template.json" buildAction="Content" />
</contentFiles>
</metadata>
<files>
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\bin\Debug\net6.0\NetDaemon.Templates.Project.dll" target="lib\net6.0\NetDaemon.Templates.Project.dll" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.devcontainer\devcontainer.json" target="content\templates\netdaemon\.devcontainer\devcontainer.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.devcontainer\devcontainer.json" target="contentFiles\any\net6.0\templates\netdaemon\.devcontainer\devcontainer.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.devcontainer\Dockerfile" target="content\templates\netdaemon\.devcontainer\Dockerfile" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.devcontainer\Dockerfile" target="contentFiles\any\net6.0\templates\netdaemon\.devcontainer\Dockerfile" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.gitattributes" target="content\templates\netdaemon\.gitattributes" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.gitattributes" target="contentFiles\any\net6.0\templates\netdaemon\.gitattributes" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.gitignore" target="content\templates\netdaemon\.gitignore" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.gitignore" target="contentFiles\any\net6.0\templates\netdaemon\.gitignore" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.vscode\daemon.code-snippets" target="content\templates\netdaemon\.vscode\daemon.code-snippets" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.vscode\daemon.code-snippets" target="contentFiles\any\net6.0\templates\netdaemon\.vscode\daemon.code-snippets" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.vscode\launch.json" target="content\templates\netdaemon\.vscode\launch.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.vscode\launch.json" target="contentFiles\any\net6.0\templates\netdaemon\.vscode\launch.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.vscode\tasks.json" target="content\templates\netdaemon\.vscode\tasks.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\.vscode\tasks.json" target="contentFiles\any\net6.0\templates\netdaemon\.vscode\tasks.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\appsettings.json" target="content\templates\netdaemon\appsettings.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\appsettings.json" target="contentFiles\any\net6.0\templates\netdaemon\appsettings.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\AppModel\YamlConfigApp\YamlConfigApp.cs" target="content\templates\netdaemon\apps\AppModel\YamlConfigApp\YamlConfigApp.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\AppModel\YamlConfigApp\YamlConfigApp.cs" target="contentFiles\any\net6.0\templates\netdaemon\apps\AppModel\YamlConfigApp\YamlConfigApp.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\AppModel\YamlConfigApp\YamlConfigApp.yaml" target="content\templates\netdaemon\apps\AppModel\YamlConfigApp\YamlConfigApp.yaml" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\AppModel\YamlConfigApp\YamlConfigApp.yaml" target="contentFiles\any\net6.0\templates\netdaemon\apps\AppModel\YamlConfigApp\YamlConfigApp.yaml" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\Extensions\Scheduling\Scheduling.cs" target="content\templates\netdaemon\apps\Extensions\Scheduling\Scheduling.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\Extensions\Scheduling\Scheduling.cs" target="contentFiles\any\net6.0\templates\netdaemon\apps\Extensions\Scheduling\Scheduling.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\GlobalUsings.cs" target="content\templates\netdaemon\apps\GlobalUsings.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\GlobalUsings.cs" target="contentFiles\any\net6.0\templates\netdaemon\apps\GlobalUsings.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\HassModel\HelloWorld\HelloWorld.cs" target="content\templates\netdaemon\apps\HassModel\HelloWorld\HelloWorld.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\HassModel\HelloWorld\HelloWorld.cs" target="contentFiles\any\net6.0\templates\netdaemon\apps\HassModel\HelloWorld\HelloWorld.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\HassModel\LightOnMovement\LightOnMovement.cs" target="content\templates\netdaemon\apps\HassModel\LightOnMovement\LightOnMovement.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\apps\HassModel\LightOnMovement\LightOnMovement.cs" target="contentFiles\any\net6.0\templates\netdaemon\apps\HassModel\LightOnMovement\LightOnMovement.cs" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\daemonapp.csproj" target="content\templates\netdaemon\daemonapp.csproj" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\daemonapp.csproj" target="contentFiles\any\net6.0\templates\netdaemon\daemonapp.csproj" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\Properties\launchSettings.json" target="content\templates\netdaemon\Properties\launchSettings.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\Properties\launchSettings.json" target="contentFiles\any\net6.0\templates\netdaemon\Properties\launchSettings.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\template.json" target="content\templates\netdaemon\template.json" />
<file src="C:\git\csproj-template\src\NetDaemon.Templates.Project\templates\netdaemon\template.json" target="contentFiles\any\net6.0\templates\netdaemon\template.json" />
</files>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("NetDaemon.ProjectTemplate")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("NetDaemon.ProjectTemplate")]
[assembly: System.Reflection.AssemblyTitleAttribute("NetDaemon.ProjectTemplate")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
165d8c92b83e3a65d7f92e2d14c36fb47d746eb3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net6.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = NetDaemon.Tools.ProjectTemplate
build_property.ProjectDir = C:\git\csproj-template\src\NetDaemon.ProjectTemplate\
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("helto4real")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("This package provides project templates for the dotnet cli")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("NetDaemon.Templates.Project")]
[assembly: System.Reflection.AssemblyTitleAttribute("NetDaemon.Templates.Project")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c459134edd5094db56289b3e18f21f8988e960cd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net6.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = NetDaemon.Templates.Project
build_property.ProjectDir = C:\git\csproj-template\src\NetDaemon.Templates.Project\
Loading

0 comments on commit c4d1e67

Please sign in to comment.