Skip to content

Create CICD with Actions #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: .NET

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5

# - name: Setup VSTest
# uses: darenm/Setup-VSTest@v1

- name: Navigate to Workspace
run: cd $GITHUB_WORKSPACE

- name: Restore Packages
run: nuget restore DynaForge\DynaForge.sln

- name: Build Solution
run: |
msbuild.exe DynaForge\DynaForge.sln /p:platform="Any CPU" /p:configuration="Release"

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: DynaForge
path: packages\
10 changes: 8 additions & 2 deletions DynaForge/DynaForge.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Release|Any CPU.Build.0 = Release|Any CPU
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Debug|x64.ActiveCfg = Debug|x64
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Debug|x64.Build.0 = Debug|x64
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Release|Any CPU.ActiveCfg = Release|x64
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Release|Any CPU.Build.0 = Release|x64
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Release|x64.ActiveCfg = Release|x64
{CEE15DE8-3542-492D-9280-792E39AE25C8}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
23 changes: 22 additions & 1 deletion DynaForge/DynaForge/DynaForge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\DynaForge.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>bin\Debug\DynaForge.xml</DocumentationFile>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>bin\Release\DynaForge.xml</DocumentationFile>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="CefSharp, Version=93.1.111.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>..\packages\CefSharp.Common.93.1.111\lib\net452\CefSharp.dll</HintPath>
Expand Down Expand Up @@ -227,7 +247,8 @@
<MakeDir Directories="$(SolutionDir)..\packages\DynaForge\extra" />
</Target>
<PropertyGroup>
<PostBuildEvent>copy "$(SolutionDir)DynaForge\pkg.json" "$(SolutionDir)\..\packages\DynaForge"
<PostBuildEvent>mkdir "$(SolutionDir)..\packages\DynaForge"
copy "$(SolutionDir)DynaForge\pkg.json" "$(SolutionDir)..\packages\DynaForge"
if $(ConfigurationName) == Debug xcopy /E /Y "$(ProjectDir)..\..\packages\" "$(AppData)\Dynamo\Dynamo Revit\2.5\packages"</PostBuildEvent>
</PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down