Skip to content

Commit 03a1727

Browse files
committed
chore: prepare multi version
1 parent f8c2ba8 commit 03a1727

File tree

7 files changed

+93
-43
lines changed

7 files changed

+93
-43
lines changed

.github/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Umbraco.Community.DataProtection
22

3-
[![Umbraco Version](https://img.shields.io/badge/Umbraco-10.4+-%233544B1?style=flat&logo=umbraco)](https://marketplace.umbraco.com/package/umbraco.community.dataprotection)
4-
[![NuGet](https://img.shields.io/nuget/vpre/Umbraco.Community.DataProtection?color=0273B3)](https://www.nuget.org/packages/Umbraco.Community.DataProtection)
5-
[![GitHub license](https://img.shields.io/github/license/jcdcdev/Umbraco.Community.DataProtection?color=8AB803)](https://github.com/jcdcdev/Umbraco.Community.DataProtection/blob/main/LICENSE)
6-
[![Downloads](https://img.shields.io/nuget/dt/Umbraco.Community.DataProtection?color=cc9900)](https://www.nuget.org/packages/Umbraco.Community.DataProtection/)
3+
[![Umbraco Marketplace](https://img.shields.io/badge/Umbraco-Marketplace-%233544B1?style=flat&logo=umbraco)](https://marketplace.umbraco.com/package/umbraco.community.dataprotection)
4+
[![GitHub License](https://img.shields.io/github/license/jcdcdev/Umbraco.Community.DataProtection?color=8AB803&label=License&logo=github)](https://github.com/jcdcdev/Umbraco.Community.DataProtection/blob/main/LICENSE)
5+
[![NuGet Downloads](https://img.shields.io/nuget/dt/Umbraco.Community.DataProtection?color=cc9900&label=Downloads&logo=nuget)](https://www.nuget.org/packages/Umbraco.Community.DataProtection/)
76

87
Simple [ASP.NET Core Data Protection](https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/introduction?view=aspnetcore-8.0) for Umbraco CMS.
98

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ jobs:
77
metadata:
88
uses: jcdcdev/jcdcdev.Github.UmbracoSimpleDeploy/.github/workflows/generate-project-metadata.yml@main
99
build:
10-
uses: jcdcdev/jcdcdev.Github.UmbracoSimpleDeploy/.github/workflows/build-template.yml@main
10+
runs-on: ubuntu-latest
1111
needs:
1212
- metadata
13-
with:
14-
project-name: ${{ needs.metadata.outputs.project-name }}
15-
project-path: ${{ needs.metadata.outputs.project-path }}
13+
steps:
14+
- name: Build
15+
uses: jcdcdev/jcdcdev.Umbraco.Github.Build@main
16+
with:
17+
project-name: ${{ needs.metadata.outputs.project-name}}
18+
project-path: ${{ needs.metadata.outputs.project-path }}
19+
umbraco-version: UMBRACO_VERSION

.github/workflows/release.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
name: 🚀 Release
22
on:
33
workflow_dispatch:
4+
pull_request:
5+
types: [ closed ]
46
jobs:
57
metadata:
68
uses: jcdcdev/jcdcdev.Github.UmbracoSimpleDeploy/.github/workflows/generate-project-metadata.yml@main
7-
build:
8-
uses: jcdcdev/jcdcdev.Github.UmbracoSimpleDeploy/.github/workflows/build-template.yml@main
9-
needs:
10-
- metadata
11-
with:
12-
project-name: ${{ needs.metadata.outputs.project-name }}
13-
project-path: ${{ needs.metadata.outputs.project-path }}
149
release:
15-
needs:
16-
- build
10+
runs-on: ubuntu-latest
1711
permissions:
1812
contents: write
19-
uses: jcdcdev/jcdcdev.Github.UmbracoSimpleDeploy/.github/workflows/release-template.yml@main
20-
with:
21-
artifact-name: ${{ needs.build.outputs.artifact-name }}
22-
version: ${{ needs.build.outputs.version }}
23-
secrets:
24-
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
13+
needs:
14+
- metadata
15+
steps:
16+
- name: Build
17+
id: build
18+
uses: jcdcdev/jcdcdev.Umbraco.GitHub.Build@main
19+
with:
20+
project-name: ${{ needs.metadata.outputs.project-name}}
21+
project-path: ${{ needs.metadata.outputs.project-path }}
22+
umbraco-version: UMBRACO_VERSION
23+
- name: Release
24+
uses: jcdcdev/jcdcdev.Umbraco.GitHub.Release@main
25+
with:
26+
artifact-name: ${{ steps.build.outputs.artifact-name }}
27+
version: ${{ steps.build.outputs.version }}
28+
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
29+
github-token: ${{ secrets.GITHUB_TOKEN }}

docs/README_nuget.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Umbraco.Community.DataProtection
2+
3+
[![Documentation](https://img.shields.io/badge/Docs-Quickstart-394933?style=flat&logo=github)](https://github.com/jcdcdev/Umbraco.Community.DataProtection/tree/main?tab=readme-ov-file#quick-start)
4+
[![Umbraco Marketplace](https://img.shields.io/badge/Umbraco-Marketplace-%233544B1?style=flat&logo=umbraco)](https://marketplace.umbraco.com/package/umbraco.community.dataprotection)
5+
[![GitHub License](https://img.shields.io/github/license/jcdcdev/Umbraco.Community.DataProtection?color=8AB803&label=License&logo=github)](https://github.com/jcdcdev/Umbraco.Community.DataProtection/blob/main/LICENSE)
6+
[![NuGet Downloads](https://img.shields.io/nuget/dt/Umbraco.Community.DataProtection?color=cc9900&label=Downloads&logo=nuget)](https://www.nuget.org/packages/Umbraco.Community.DataProtection/)
7+
8+
Simple [ASP.NET Core Data Protection](https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/introduction?view=aspnetcore-8.0) for Umbraco CMS.
9+
10+
Data protection keys are stored in the Umbraco database.
11+
12+
## Quick Start
13+
14+
### Install
15+
16+
```csharp
17+
dotnet add package Umbraco.Community.DataProtection
18+
```
19+
20+
### Configure
21+
22+
```csharp
23+
using Umbraco.Cms.Core.Composing;
24+
using Umbraco.Cms.Core.DependencyInjection;
25+
26+
namespace Project.Web;
27+
28+
public class Composer : IComposer
29+
{
30+
public void Compose(IUmbracoBuilder builder)
31+
{
32+
builder.AddUmbracoDataProtection();
33+
}
34+
}
35+
```
36+
37+
## Contributing
38+
39+
Contributions to this package are most welcome! Please read the [Contributing Guidelines](https://github.com/jcdcdev/Umbraco.Community.DataProtection/blob/main/.github/CONTRIBUTING.md).
40+
41+
## Acknowledgments (thanks!)
42+
43+
- LottePitcher - [opinionated-package-starter](https://github.com/LottePitcher/opinionated-package-starter)
44+
- jcdcdev - [jcdcdev.Umbraco.PackageTemplate](https://github.com/jcdcdev/jcdcdev.Umbraco.PackageTemplate)

src/Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project>
2+
<PropertyGroup>
3+
<NuGetAuditMode>all</NuGetAuditMode>
4+
<NuGetAuditLevel>high</NuGetAuditLevel>
5+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
6+
</PropertyGroup>
7+
</Project>

src/Umbraco.Community.DataProtection.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
77
ProjectSection(SolutionItems) = preProject
88
..\LICENSE = ..\LICENSE
99
..\.github\README.md = ..\.github\README.md
10+
..\.github\CONTRIBUTING.md = ..\.github\CONTRIBUTING.md
11+
..\docs\README_nuget.md = ..\docs\README_nuget.md
12+
Directory.Build.props = Directory.Build.props
1013
EndProjectSection
1114
EndProject
1215
Global
Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
3+
<TargetFramework>net6.0</TargetFramework>
44
<LangVersion>10</LangVersion>
55
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
66
<Nullable>enable</Nullable>
@@ -20,39 +20,27 @@
2020
<RepositoryType>git</RepositoryType>
2121
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2222
<PackageIcon>images\icon.png</PackageIcon>
23-
<NuGetAuditMode>all</NuGetAuditMode>
24-
<NuGetAuditLevel>high</NuGetAuditLevel>
25-
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
2623
</PropertyGroup>
2724

2825
<ItemGroup>
2926
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
30-
<PackageReference Include="jcdcdev.Umbraco.Core" Version="0.3.1"/>
31-
</ItemGroup>
32-
33-
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
27+
<PackageReference Include="jcdcdev.Umbraco.Core" Version="10.1.0"/>
3428
<PackageReference Include="Umbraco.Cms.Core" Version="[10.4.0,11.0.0)"/>
3529
<PackageReference Include="Umbraco.Cms.Infrastructure" Version="[10.4.0,11.0.0)"/>
3630
</ItemGroup>
3731

38-
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
39-
<PackageReference Include="Umbraco.Cms.Core" Version="[11.0.0,13.0.0)"/>
40-
<PackageReference Include="Umbraco.Cms.Infrastructure" Version="[11.0.0,13.0.0)"/>
41-
</ItemGroup>
42-
43-
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
44-
<PackageReference Include="Umbraco.Cms.Core" Version="[13.0.0,14.0.0)"/>
45-
<PackageReference Include="Umbraco.Cms.Infrastructure" Version="[13.0.0,14.0.0)"/>
46-
</ItemGroup>
47-
4832
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
49-
<PackageVersion>$([System.DateTime]::UtcNow.ToString(`yyyy`).TrimStart(`0`)).$([System.DateTime]::UtcNow.ToString(`MM`).TrimStart(`0`))$([System.DateTime]::UtcNow.ToString(`dd`).TrimStart(`0`)).$([System.DateTime]::UtcNow.ToString(`Hmm`).TrimStart(`0`))-alpha$([System.DateTime]::UtcNow.ToString(`ss`).TrimStart(`.`))</PackageVersion>
33+
<Major>UMBRACO_VERSION</Major>
34+
<Minor>$([System.DateTime]::UtcNow.ToString(`yyyy`))</Minor>
35+
<Patch>$([System.DateTime]::UtcNow.ToString(`MMdd`).TrimStart(`0`))</Patch>
36+
<Suffix>-alpha-$([System.DateTime]::UtcNow.ToString(`Hmm-ss`).TrimStart(`.`))</Suffix>
37+
<PackageVersion>$(Major).$(Minor).$(Patch)$(Suffix)</PackageVersion>
5038
<Version>$(PackageVersion)</Version>
5139
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
5240
</PropertyGroup>
5341

5442
<ItemGroup>
5543
<None Include="..\..\docs\icon.png" Pack="true" PackagePath="images\icon.png"/>
56-
<None Include="..\..\.github\README.md" Pack="true" PackagePath="\"/>
44+
<None Include="..\..\docs\README_nuget.md" Pack="true" PackagePath="\"/>
5745
</ItemGroup>
5846
</Project>

0 commit comments

Comments
 (0)