diff --git a/.gitattributes b/.gitattributes index fcadb2cf9..d0c0c4c1d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ * text eol=lf +*.png binary diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 000000000..9ae141fbf --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,48 @@ +# Publish everything to NuGet + +name: 'Publish packages' + +on: + release: + types: [published] + +env: + DOTNET_VERSION: '7.0.x' # The .NET SDK version to use + CONFIGURATION: 'Release' # The configuration to use + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} + +jobs: + deployment: + runs-on: windows-latest + steps: + - name: Clone the repo + uses: actions/checkout@v2 + + - name: Setup Node.js environment + uses: actions/setup-node@v3.5.1 + with: + node-version: 18 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Install dependencies + run: dotnet restore ./src + + - name: Build + run: dotnet build ./src --configuration ${{ env.CONFIGURATION }} --no-restore + + - name: Package + run: dotnet pack ./src /p:PackageReleaseNotes="See https://github.com/Draco-lang/Compiler/releases/tag/${{ github.event.release.tag_name }}" + + - name: Upload to GitHub + uses: actions/upload-artifact@v2 + with: + name: Draco + path: src/**/*${{ github.event.release.tag_name }}.nupkg + + - name: Upload to NuGet.org + run: dotnet nuget push src/**/*${{ github.event.release.tag_name }}.nupkg --api-key ${{ env.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json --no-symbols true diff --git a/resources/PackageIcon.png b/resources/PackageIcon.png index 23a4f9d4f..80dccbc87 100644 Binary files a/resources/PackageIcon.png and b/resources/PackageIcon.png differ diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 558d9cfdd..a81a9153a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,6 @@ - 0.0.1-alpha + 0.1.0-pre net7.0 @@ -10,7 +10,7 @@ Draco-lang Compiler tools for the Draco programming language. Apache-2.0 - Draco, compiler, language + Draco;compiler;language Copyright (c) 2023 Draco team git https://github.com/Draco-lang/Compiler diff --git a/src/Draco.Editor.Web/Draco.Editor.Web.csproj b/src/Draco.Editor.Web/Draco.Editor.Web.csproj index 270d79c13..3e5056ddc 100644 --- a/src/Draco.Editor.Web/Draco.Editor.Web.csproj +++ b/src/Draco.Editor.Web/Draco.Editor.Web.csproj @@ -7,6 +7,7 @@ false 11 true + false diff --git a/src/Draco.LanguageServer/Draco.LanguageServer.csproj b/src/Draco.LanguageServer/Draco.LanguageServer.csproj index 32951e9b8..0a9ff012f 100644 --- a/src/Draco.LanguageServer/Draco.LanguageServer.csproj +++ b/src/Draco.LanguageServer/Draco.LanguageServer.csproj @@ -5,6 +5,7 @@ net7.0 enable 11 + false diff --git a/src/Draco.ProjectTemplates/Draco.ProjectTemplates.csproj b/src/Draco.ProjectTemplates/Draco.ProjectTemplates.csproj deleted file mode 100644 index b4f6dbe2b..000000000 --- a/src/Draco.ProjectTemplates/Draco.ProjectTemplates.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Template - Default Draco project templates. - dotnet-new;templates;Draco - netstandard2.0 - - true - false - content - - - - - - - - diff --git a/src/Draco.ProjectTemplates/Draco.ProjectTemplates.msbuildproj b/src/Draco.ProjectTemplates/Draco.ProjectTemplates.msbuildproj new file mode 100644 index 000000000..8d9315750 --- /dev/null +++ b/src/Draco.ProjectTemplates/Draco.ProjectTemplates.msbuildproj @@ -0,0 +1,31 @@ + + + + Template + Default Draco project templates. + dotnet-new;templates;Draco + netstandard2.0 + + false + $(NoWarn);NU5128 + + + false + + + + + <_File Include="templates\**\*.*" /> + + + + + + + + + + \ No newline at end of file diff --git a/src/Draco.ProjectTemplates/templates/console/.template.config/template.json b/src/Draco.ProjectTemplates/templates/console/.template.config/template.json index ca30f9b43..5d06d987a 100644 --- a/src/Draco.ProjectTemplates/templates/console/.template.config/template.json +++ b/src/Draco.ProjectTemplates/templates/console/.template.config/template.json @@ -44,7 +44,7 @@ "path": "./main.draco" }, { - "path": "./DracoConsole.dracoproj" + "path": "./ConsoleApplication.dracoproj" } ] } diff --git a/src/Draco.ProjectTemplates/templates/console/DracoConsole.dracoproj b/src/Draco.ProjectTemplates/templates/console/ConsoleApplication.dracoproj similarity index 76% rename from src/Draco.ProjectTemplates/templates/console/DracoConsole.dracoproj rename to src/Draco.ProjectTemplates/templates/console/ConsoleApplication.dracoproj index a8978f949..53cd0db1c 100644 --- a/src/Draco.ProjectTemplates/templates/console/DracoConsole.dracoproj +++ b/src/Draco.ProjectTemplates/templates/console/ConsoleApplication.dracoproj @@ -1,4 +1,4 @@ - + Exe {TargetFramework} diff --git a/src/Draco.RedGreenTree.Attributes/Draco.RedGreenTree.Attributes.csproj b/src/Draco.RedGreenTree.Attributes/Draco.RedGreenTree.Attributes.csproj index b47ce4237..396415f8d 100644 --- a/src/Draco.RedGreenTree.Attributes/Draco.RedGreenTree.Attributes.csproj +++ b/src/Draco.RedGreenTree.Attributes/Draco.RedGreenTree.Attributes.csproj @@ -3,6 +3,7 @@ netstandard2.0 11 + false diff --git a/src/Draco.RedGreenTree.SourceGenerator/Draco.RedGreenTree.SourceGenerator.csproj b/src/Draco.RedGreenTree.SourceGenerator/Draco.RedGreenTree.SourceGenerator.csproj index 1132d479d..f7f968639 100644 --- a/src/Draco.RedGreenTree.SourceGenerator/Draco.RedGreenTree.SourceGenerator.csproj +++ b/src/Draco.RedGreenTree.SourceGenerator/Draco.RedGreenTree.SourceGenerator.csproj @@ -4,6 +4,7 @@ netstandard2.0 enable 11 + false diff --git a/src/Draco.RedGreenTree/Draco.RedGreenTree.csproj b/src/Draco.RedGreenTree/Draco.RedGreenTree.csproj index fe1f564d2..6c8636ac2 100644 --- a/src/Draco.RedGreenTree/Draco.RedGreenTree.csproj +++ b/src/Draco.RedGreenTree/Draco.RedGreenTree.csproj @@ -4,6 +4,7 @@ netstandard2.0 enable 11 + false diff --git a/src/Draco.sln b/src/Draco.sln index 62b9a6b73..32a000837 100644 --- a/src/Draco.sln +++ b/src/Draco.sln @@ -31,6 +31,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Draco.Compiler.Tasks", "Dra EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Draco.Compiler.Toolset", "Draco.Compiler.Toolset\Draco.Compiler.Toolset.csproj", "{82765FD8-0985-475F-BDE6-3A27254FF457}" EndProject +Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "Draco.ProjectTemplates", "Draco.ProjectTemplates\Draco.ProjectTemplates.msbuildproj", "{61ED6EF8-D66C-42F4-AD8C-0AFFDA54D2C3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -104,6 +106,12 @@ Global {82765FD8-0985-475F-BDE6-3A27254FF457}.Nuget|Any CPU.Build.0 = Debug|Any CPU {82765FD8-0985-475F-BDE6-3A27254FF457}.Release|Any CPU.ActiveCfg = Release|Any CPU {82765FD8-0985-475F-BDE6-3A27254FF457}.Release|Any CPU.Build.0 = Release|Any CPU + {61ED6EF8-D66C-42F4-AD8C-0AFFDA54D2C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61ED6EF8-D66C-42F4-AD8C-0AFFDA54D2C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61ED6EF8-D66C-42F4-AD8C-0AFFDA54D2C3}.Nuget|Any CPU.ActiveCfg = Debug|Any CPU + {61ED6EF8-D66C-42F4-AD8C-0AFFDA54D2C3}.Nuget|Any CPU.Build.0 = Debug|Any CPU + {61ED6EF8-D66C-42F4-AD8C-0AFFDA54D2C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61ED6EF8-D66C-42F4-AD8C-0AFFDA54D2C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE