Skip to content

Commit

Permalink
Update Build
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Nov 19, 2023
1 parent 05e0f6b commit 40d85f9
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 84 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/Publish.yml → .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
# ------------------------------------------------------------------------------
# Publish.yml
# Build.yml
# ------------------------------------------------------------------------------

name: Publish
name: Build

on:
push:
branches:
pull_request:
branches-ignore:
- master
- main
workflow_dispatch:

jobs:
Publish:
name: Publish
Build:
name: Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v1

- name: NuGet Setup
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: "NuGet Add Source Organization"
run: if ("${{ secrets.ORGANIZATION_SOURCE_PACKAGE_PASSWORD }}" -ne "") { dotnet nuget add source --username ${{ secrets.ORGANIZATION_SOURCE_PACKAGE_USERNAME }} --password ${{ secrets.ORGANIZATION_SOURCE_PACKAGE_PASSWORD }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{github.repository_owner}}/index.json" }

- name: Run './build/build.cmd'
run: ./build/build.cmd --root ./build
env:
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/Develop.yml

This file was deleted.

10 changes: 10 additions & 0 deletions Build/.nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
"type": "boolean",
"description": "Shows the execution plan (HTML)"
},
"PreReleaseFilter": {
"type": "array",
"items": {
"type": "string"
}
},
"Profile": {
"type": "array",
"description": "Defines the profiles to load",
Expand Down Expand Up @@ -126,9 +132,11 @@
"Build",
"Clean",
"Compile",
"GitPreRelease",
"GitRelease",
"Pack",
"PackageBuilder",
"PrePack",
"Release",
"Sign",
"TestLocal"
Expand All @@ -148,9 +156,11 @@
"Build",
"Clean",
"Compile",
"GitPreRelease",
"GitRelease",
"Pack",
"PackageBuilder",
"PrePack",
"Release",
"Sign",
"TestLocal"
Expand Down
2 changes: 1 addition & 1 deletion Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using ricaun.Nuke;
using ricaun.Nuke.Components;

class Build : NukeBuild, IPublishPack, IRevitPackageBuilder, ITestLocal
class Build : NukeBuild, IPublishPack, IRevitPackageBuilder, ITestLocal, IPrePack
{
string IHazPackageBuilderProject.Name => "Example";
string IHazRevitPackageBuilder.Application => "Revit.App";
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.6.0] / 2023-11-19
### Features
- Update to support `net7.0-windows`
### Updated
- Update `Build` project

## [0.5.7] / 2023-11-17
### Features
- LargeImage changes `TextBox` Image
Expand Down Expand Up @@ -301,6 +307,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- First Release

[vNext]: ../../compare/1.0.0...HEAD
[0.6.0]: ../../compare/0.5.7...0.6.0
[0.5.7]: ../../compare/0.5.6...0.5.7
[0.5.6]: ../../compare/0.5.5...0.5.6
[0.5.5]: ../../compare/0.5.4...0.5.5
Expand Down
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<Version>0.6.0</Version>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
[![Visual Studio 2022](https://img.shields.io/badge/Visual%20Studio-2022-blue)](../..)
[![Nuke](https://img.shields.io/badge/Nuke-Build-blue)](https://nuke.build/)
[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Publish](../../actions/workflows/Publish.yml/badge.svg)](../../actions)
[![Develop](../../actions/workflows/Develop.yml/badge.svg)](../../actions)
[![Build](../../actions/workflows/Build.yml/badge.svg)](../../actions)
[![Release](https://img.shields.io/nuget/v/ricaun.Revit.UI?logo=nuget&label=release&color=blue)](https://www.nuget.org/packages/ricaun.Revit.UI)

This project was generated by the [ricaun.AppLoader](https://ricaun.com/AppLoader/) Revit plugin, the test project use the [ricaun.RevitTest](https://ricaun.com/RevitTest) test framework.
Expand Down
7 changes: 2 additions & 5 deletions ricaun.Revit.UI.Example/ricaun.Revit.UI.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

<PropertyGroup>
<PackageId>ricaun.Revit.UI.Example</PackageId>
<Version>0.5.7</Version>
<Version Condition="'$(Version)' == ''">0.6.0</Version>
<ProjectGuid>{f736f68f-7101-4640-9093-8715f88ccb95}</ProjectGuid>
</PropertyGroup>

Expand Down Expand Up @@ -119,17 +119,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="*" IncludeAssets="build; compile" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="9.*" IncludeAssets="build; compile" PrivateAssets="All" />
<PackageReference Include="Revit_All_Main_Versions_API_x64" Version="$(RevitVersion).*" IncludeAssets="build; compile" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ricaun.Revit.UI\ricaun.Revit.UI.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\icon.png" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions ricaun.Revit.UI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution", "Solution", "{A81D2950-B5CB-4CDB-B7FE-9132C730C8CC}"
ProjectSection(SolutionItems) = preProject
CHANGELOG.md = CHANGELOG.md
Directory.Build.props = Directory.Build.props
README.md = README.md
EndProjectSection
EndProject
Expand Down
47 changes: 11 additions & 36 deletions ricaun.Revit.UI/ricaun.Revit.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,24 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<UseWPF>true</UseWPF>
<LangVersion>latest</LangVersion>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

<!-- RevitVersion -->
<PropertyGroup>
<TargetFrameworks>net46;net7.0-windows</TargetFrameworks>
</PropertyGroup>
<Choose>
<When Condition="$(Configuration.Contains('2017'))">
<When Condition="$(TargetFramework.StartsWith('net4'))">
<PropertyGroup>
<RevitVersion>2017</RevitVersion>
<TargetFramework>net46</TargetFramework>
</PropertyGroup>
</When>
<When Condition="$(Configuration.Contains('2018'))">
<PropertyGroup>
<RevitVersion>2018</RevitVersion>
<TargetFramework>net46</TargetFramework>
</PropertyGroup>
</When>
<When Condition="$(Configuration.Contains('2019'))">
<PropertyGroup>
<RevitVersion>2019</RevitVersion>
<TargetFramework>net47</TargetFramework>
</PropertyGroup>
</When>
<When Condition="$(Configuration.Contains('2020'))">
<PropertyGroup>
<RevitVersion>2020</RevitVersion>
<TargetFramework>net47</TargetFramework>
</PropertyGroup>
</When>
<When Condition="$(Configuration.Contains('2021'))">
<PropertyGroup>
<RevitVersion>2021</RevitVersion>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
</When>
<When Condition="$(Configuration.Contains('2022'))">
<PropertyGroup>
<RevitVersion>2022</RevitVersion>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<RevitVersion>2017</RevitVersion>
<TargetFramework>net46</TargetFramework>
<RevitVersion>2025</RevitVersion>
</PropertyGroup>
</Otherwise>
</Choose>
Expand All @@ -76,7 +47,7 @@

<PropertyGroup>
<PackageId>ricaun.Revit.UI</PackageId>
<Version>0.5.7</Version>
<Version Condition="'$(Version)' == ''">0.6.0</Version>
<ProjectGuid>{2064ba4d-5527-41e9-8b76-0cbfefa35900}</ProjectGuid>
</PropertyGroup>

Expand Down Expand Up @@ -146,6 +117,10 @@
<PackageReference Include="Revit_All_Main_Versions_API_x64" Version="$(RevitVersion).*" IncludeAssets="build; compile" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net7'))">
<PackageReference Include="System.Drawing.Common" Version="7.*" IncludeAssets="build; compile" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="$(PackageId).Tests" />
</ItemGroup>
Expand Down

0 comments on commit 40d85f9

Please sign in to comment.