Skip to content
This repository was archived by the owner on Apr 6, 2022. It is now read-only.

Commit 71aa0d2

Browse files
committed
preparing release
1 parent ebb0116 commit 71aa0d2

File tree

6 files changed

+113
-33
lines changed

6 files changed

+113
-33
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,58 +12,55 @@ env:
1212
CONFIG: release
1313

1414
on:
15-
push:
16-
tags:
17-
- "release/*"
15+
release:
16+
types: [published]
1817

1918
jobs:
2019
build:
2120
runs-on: windows-latest
2221

23-
steps:
24-
- name: Get Version
22+
steps:
23+
- name: Get Version
2524
id: get_version
2625
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/release\//}
2726
shell: bash
28-
27+
2928
- name: checkout
3029
uses: actions/checkout@v2
31-
30+
3231
- name: Setup NuGet.exe for use with actions
33-
uses: NuGet/setup-nuget@v1.0.2
34-
32+
uses: NuGet/setup-nuget@v1.0.5
33+
3534
- name: Setup .net core
3635
uses: actions/setup-dotnet@v1.4.0
37-
36+
3837
- name: Setup UmbPack
3938
run: dotnet tool install Umbraco.Tools.Packages --global
40-
39+
4140
- name: Setup MSBuild
4241
uses: microsoft/setup-msbuild@v1
4342

44-
- name: Restore Packages
43+
- name: Restore Project
4544
run: dotnet restore ./src
4645

4746
- name: Build Project
4847
run: msbuild ./src -p:Configuration=${{ env.CONFIG }}
49-
48+
5049
- name: Create NuGet package file
51-
run: dotnet pack ${{ env.LIBRARY_FOLDER }} -c ${{ env.CONFIG }} --no-build --include-symbols -o ${{ env.OUTPUT }} /p:version=${{ steps.get_version.outputs.VERSION }}
50+
run: dotnet pack ${{ env.LIBRARY_FOLDER }} -c ${{ env.CONFIG }} --no-build --include-symbols -o ${{ env.OUTPUT }} /p:version=${{ steps.get_version.outputs.VERSION }}
5251

53-
# # For the push step to work you will need to create an api key on NuGet, and save it as a secret on Github with the name "NUGET_DEPLOY_KEY"
54-
# - name: Push package to NuGet
55-
# run: dotnet nuget push ${{ env.OUTPUT }}/*.nupkg -k ${{ secrets.NUGET_DEPLOY_KEY } -s https://api.nuget.org/v3/index.json
56-
57-
# path to your package.xml file should go here.
5852
- name: Create Umbraco package file
5953
run: UmbPack pack ./package.xml -o ${{ env.OUTPUT }} -v ${{ steps.get_version.outputs.VERSION }}
6054

61-
# # For the push step to work you will need to create an api key on Our, and save it as a secret on Github with the name "UMBRACO_DEPLOY_KEY"
62-
# - name: Push package to Our
63-
# run: umbpack push ${{ env.OUTPUT }}/Our.Umbraco.BlockListMvc_${{ steps.get_version.outputs.VERSION }}.zip -k ${{ secrets.UMBRACO_DEPLOY_KEY }}
64-
6555
- name: upload-artifacts
6656
uses: actions/upload-artifact@v2
6757
with:
6858
name: Build-Results-${{ steps.get_version.outputs.VERSION }}
69-
path: ${{ env.OUTPUT }}/**/*
59+
path: ${{ env.OUTPUT }}/**/*
60+
61+
- name: Push to NuGet
62+
run: dotnet nuget push ${{ env.OUTPUT }}/Our.Umbraco.BlockListMvc.${{ steps.get_version.outputs.VERSION }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
63+
64+
- name: Push to Our
65+
if: contains(steps.get_version.outputs.VERSION, '-') != true
66+
run: UmbPack push ${{ env.OUTPUT }}/Our.Umbraco.BlockListMvc_${{ steps.get_version.outputs.VERSION }}.zip -k ${{ secrets.OUR_API_KEY }} -a *

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## 0.1.0 - 2021-03-28
9+
- First release

docs/logo.png

3.54 KB
Loading

package.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
<info>
44
<package>
55
<name>Our.Umbraco.BlockListMvc</name>
6-
<version>1.0.0</version>
6+
<version>0.1.0</version>
77
<iconUrl></iconUrl>
88
<licence url="https://opensource.org/licenses/MIT">MIT</licence>
99
<url>https://our.umbraco.com</url>
1010
<requirements type="strict">
1111
<major>8</major>
12-
<minor>0</minor>
12+
<minor>7</minor>
1313
<patch>0</patch>
1414
</requirements>
1515
</package>
1616
<author>
17-
<name>UmbracoPackageTeam</name>
18-
<website>https://our.umbraco.com</website>
17+
<name>Søren Kottal</name>
18+
<website>https://www.skttl.dk</website>
1919
</author>
20-
<readme><![CDATA[Another awesome package]]></readme>
20+
<readme><![CDATA[Route hijacking and goodies for Block List rendering]]></readme>
2121
</info>
2222
<files>
2323
<folder path="src/Our.Umbraco.BlockListMvc/App_Plugins/Our.Umbraco.BlockListMvc" orgPath="App_Plugins/Our.Umbraco.BlockListMvc" />

readme.md

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,35 @@
11
# Our.Umbraco.BlockListMvc
2-
WIP port of the [hijacking feature from Doc Type Grid Editor](https://github.com/skttl/umbraco-doc-type-grid-editor/blob/develop/docs/developers-guide.md#doctypegrideditorsurfacecontroller), to be used when rendering Block Lists in Umbraco.
3-
4-
Still very much work in progress
2+
If you are not the type of developer that likes to put business logic in your views, then the ability to have a controller for you partial view is a must. Block List MVC gives you the ability, to create Surface Controllers, to use when rendering items from a Block List in Umbraco.
53

64

75
---
86

7+
## Getting started
8+
9+
### Installation
10+
> *Note:* Full Text Search has been developed against **Umbraco v8.1.0** and will support that version and above.
11+
12+
Full Text Search can be installed from either Our Umbraco package repository, or NuGet. See developers guide for more information.
13+
14+
#### Our Umbraco package repository
15+
16+
To install from Our Umbraco, please download the package from:
917

18+
> [https://our.umbraco.com/packages/website-utilities/full-text-search-8/](https://our.umbraco.com/packages/website-utilities/full-text-search-8/)
19+
20+
#### NuGet package repository
21+
22+
To [install from NuGet](https://www.nuget.org/packages/Our.Umbraco.BlockListMvc), you can run the following command from within Visual Studio:
23+
24+
PM> Install-Package Our.Umbraco.BlockListMvc
25+
26+
---
27+
28+
## Developers Guide
1029

1130
#### BlockListMvcSurfaceController
1231

13-
If you are not the type of developer that likes to put business logic in your views, then the ability to have a controller for you partial view is a must. To help with this, the **BlockListMvc** comes with a base surface controller you can used called `BlockListMvcSurfaceController`.
32+
**BlockListMvc** comes with a base surface controller you can used called `BlockListMvcSurfaceController`. This is the heart of Block List MVC, and the controller that your block list item gets routed through when rendering.
1433

1534
Simply create your controller inheriting from the above class, giving it a class name of `{DocTypeAlias}SurfaceController` and an action name of `{DocTypeAlias}` and then **BlockListMvc** will automatically wire it up for you and use it at render time.
1635

@@ -88,3 +107,36 @@ Example:
88107
<p>@Model.Content.FeatureDetails</p>
89108
</div>
90109
```
110+
111+
---
112+
113+
#### Default BlockListMvcSurfaceController
114+
**BlockListMvc** comes with a default BlockListMvcSurfaceController, which controls all block items that doesn't have their own SurfaceController. If you wish to override this, you can do it using a Composer, and the extension method `SetDefaultBlockListMvcController` from the `Our.Umbraco.BlockListMvc.Composing` namespace.
115+
116+
Example:
117+
```cs
118+
using System.Web.Mvc;
119+
using Umbraco.Core.Composing;
120+
using Our.Umbraco.BlockListMvc.Composing;
121+
using Our.Umbraco.BlockListMvc.Controllers;
122+
123+
namespace Our.Umbraco.BlockListMvc.Site
124+
{
125+
public class MyDefaultBlockListMvcSurfaceController : BlockListMvcSurfaceController
126+
{
127+
public ActionResult Index()
128+
{
129+
/* TODO: Amass unicorns */
130+
return CurrentPartialView();
131+
}
132+
}
133+
134+
public class DefaultBlockListMvcSurfaceControllerComponent : IUserComposer
135+
{
136+
public void Compose(Composition composition)
137+
{
138+
composition.SetDefaultBlockListMvcController<MyDefaultBlockListMvcSurfaceController>();
139+
}
140+
}
141+
}
142+
```

src/Our.Umbraco.BlockListMvc/Our.Umbraco.BlockListMvc.csproj

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111
<PropertyGroup>
1212
<OutputPath>bin\output\</OutputPath>
1313
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
14+
<Version>0.1.0</Version>
15+
<Authors>Søren Kottal</Authors>
16+
<Product>Block List MVC for Umbraco</Product>
17+
<Description>If you are not the type of developer that likes to put business logic in your views, then the ability to have a controller for you partial view is a must. Block List MVC gives you the ability, to create Surface Controllers, to use when rendering items from a Block List in Umbraco.</Description>
18+
<Copyright>Søren Kottal</Copyright>
19+
<PackageLicenseExpression></PackageLicenseExpression>
20+
<PackageProjectUrl>https://github.com/skttl/umbraco-blocklistmvc</PackageProjectUrl>
21+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
22+
<PackageIcon>logo.png</PackageIcon>
23+
<RepositoryUrl>https://github.com/skttl/umbraco-blocklistmvc</RepositoryUrl>
24+
<PackageTags>umbraco blocklist mvc</PackageTags>
1425
</PropertyGroup>
1526

1627
<ItemGroup>
@@ -36,4 +47,15 @@
3647
<Compile Include="Models\BlockListItemRendering.cs" />
3748
<Compile Include="Mvc\BlockListItemViewPage.cs" />
3849
</ItemGroup>
50+
51+
<ItemGroup>
52+
<None Include="..\..\docs\logo.png">
53+
<Pack>True</Pack>
54+
<PackagePath></PackagePath>
55+
</None>
56+
<None Include="..\..\LICENSE">
57+
<Pack>True</Pack>
58+
<PackagePath></PackagePath>
59+
</None>
60+
</ItemGroup>
3961
</Project>

0 commit comments

Comments
 (0)