Skip to content

Commit 83290a1

Browse files
#2297 add github action and deploy packages to nuget (#2302)
* #2297 add github actions to publish packages to nuget * #2297 add comment for publishing package --------- Co-authored-by: Amir Pournasserian <amir.pournasserian@live.com>
1 parent 472866d commit 83290a1

76 files changed

Lines changed: 759 additions & 41 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
on:
2+
push:
3+
tags:
4+
- "v[0-9]+.[0-9]+.[0-9]+"
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 15
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Setup .NET
14+
uses: actions/setup-dotnet@v4
15+
with:
16+
dotnet-version: '8.x.x'
17+
18+
- name: Verify commit exists in origin/main
19+
run: |
20+
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
21+
git branch --remote --contains | grep origin/main
22+
23+
- name: Set VERSION variable from tag
24+
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
25+
26+
- name: Build
27+
run: dotnet build src --configuration Release /p:Version=${VERSION}
28+
29+
- name: Push
30+
run: |
31+
for package in $(find ./src -name "*.nupkg"); do
32+
# echo "Should publish $package to nuget"
33+
# dotnet nuget push "$package" --source https://api.nuget.org/v3/index.json --api-key ${NUGET_TOKEN} &
34+
done
35+
wait
36+
env:
37+
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
38+

src/Backend/FluentCMS.Entities/FluentCMS.Entities.csproj

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,28 @@
33
<TargetFramework>net9.0</TargetFramework>
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
6+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
7+
<PackageId>FluentCMS.Entities</PackageId>
8+
<Version>0.0.1</Version>
9+
<Authors>Amir Pournasserian</Authors>
10+
<Company>FluentCMS</Company>
11+
<Description>Entities.</Description>
12+
<PackageTags>fluentcms;cms;entities;core</PackageTags>
13+
<RepositoryUrl>https://github.com/fluentcms/FluentCMS</RepositoryUrl>
14+
<PackageProjectUrl>https://fluentcms.com</PackageProjectUrl>
15+
<PackageIcon>icon.png</PackageIcon>
16+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
17+
<PackageReadmeFile>README.md</PackageReadmeFile>
618
</PropertyGroup>
719
<ItemGroup>
820
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="9.0.0" />
921
</ItemGroup>
1022
<ItemGroup>
1123
<ProjectReference Include="..\..\Shared\Shared.csproj" />
1224
</ItemGroup>
25+
26+
<ItemGroup>
27+
<None Include="..\..\icon.png" Pack="true" PackagePath="icon.png" />
28+
<None Include="README.md" Pack="true" PackagePath="README.md" />
29+
</ItemGroup>
1330
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# FluentCMS Entities

src/Backend/FluentCMS.Identity/FluentCMS.Identity.csproj

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,25 @@
33
<TargetFramework>net9.0</TargetFramework>
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
6+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
7+
<PackageId>FluentCMS.Identity</PackageId>
8+
<Version>0.0.1</Version>
9+
<Authors>Amir Pournasserian</Authors>
10+
<Company>FluentCMS</Company>
11+
<Description>Identity.</Description>
12+
<PackageTags>fluentcms;cms;identity;core</PackageTags>
13+
<RepositoryUrl>https://github.com/fluentcms/FluentCMS</RepositoryUrl>
14+
<PackageProjectUrl>https://fluentcms.com</PackageProjectUrl>
15+
<PackageIcon>icon.png</PackageIcon>
16+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
17+
<PackageReadmeFile>README.md</PackageReadmeFile>
618
</PropertyGroup>
719
<ItemGroup>
820
<ProjectReference Include="..\Repositories\FluentCMS.Repositories.Abstractions\FluentCMS.Repositories.Abstractions.csproj" />
921
</ItemGroup>
10-
</Project>
22+
23+
<ItemGroup>
24+
<None Include="..\..\icon.png" Pack="true" PackagePath="icon.png" />
25+
<None Include="README.md" Pack="true" PackagePath="README.md" />
26+
</ItemGroup>
27+
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# FluentCMS Identity

src/Backend/FluentCMS.Services/FluentCMS.Services.csproj

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
<TargetFramework>net9.0</TargetFramework>
44
<ImplicitUsings>disable</ImplicitUsings>
55
<Nullable>enable</Nullable>
6+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
7+
<PackageId>FluentCMS.Services</PackageId>
8+
<Version>0.0.1</Version>
9+
<Authors>Amir Pournasserian</Authors>
10+
<Company>FluentCMS</Company>
11+
<Description>Services.</Description>
12+
<PackageTags>fluentcms;cms;services;core</PackageTags>
13+
<RepositoryUrl>https://github.com/fluentcms/FluentCMS</RepositoryUrl>
14+
<PackageProjectUrl>https://fluentcms.com</PackageProjectUrl>
15+
<PackageIcon>icon.png</PackageIcon>
16+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
17+
<PackageReadmeFile>README.md</PackageReadmeFile>
618
</PropertyGroup>
719
<ItemGroup>
820
<PackageReference Include="AutoMapper" Version="13.0.1" />
@@ -16,4 +28,9 @@
1628
<ProjectReference Include="..\..\Providers\MessageBusProviders\FluentCMS.Providers.MessageBusProviders.Abstractions\FluentCMS.Providers.MessageBusProviders.Abstractions.csproj" />
1729
<ProjectReference Include="..\FluentCMS.Identity\FluentCMS.Identity.csproj" />
1830
</ItemGroup>
19-
</Project>
31+
32+
<ItemGroup>
33+
<None Include="..\..\icon.png" Pack="true" PackagePath="icon.png" />
34+
<None Include="README.md" Pack="true" PackagePath="README.md" />
35+
</ItemGroup>
36+
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# FluentCMS Services
Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
34
<TargetFramework>net9.0</TargetFramework>
45
<ImplicitUsings>disable</ImplicitUsings>
56
<Nullable>enable</Nullable>
7+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
8+
<PackageId>FluentCMS.Web.Api</PackageId>
9+
<Version>0.0.1</Version>
10+
<Authors>Amir Pournasserian</Authors>
11+
<Company>FluentCMS</Company>
12+
<Description>Web Api.</Description>
13+
<PackageTags>fluentcms;cms;webapi;core</PackageTags>
14+
<RepositoryUrl>https://github.com/fluentcms/FluentCMS</RepositoryUrl>
15+
<PackageProjectUrl>https://fluentcms.com</PackageProjectUrl>
16+
<PackageIcon>icon.png</PackageIcon>
17+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
18+
<PackageReadmeFile>README.md</PackageReadmeFile>
619
</PropertyGroup>
20+
721
<ItemGroup>
822
<PackageReference Include="AutoMapper" Version="13.0.1" />
923
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.1.0" />
1024
</ItemGroup>
25+
1126
<ItemGroup>
1227
<ProjectReference Include="..\FluentCMS.Services\FluentCMS.Services.csproj" />
1328
</ItemGroup>
29+
30+
<ItemGroup>
31+
<None Include="..\..\icon.png" Pack="true" PackagePath="icon.png" />
32+
<None Include="README.md" Pack="true" PackagePath="README.md" />
33+
</ItemGroup>
1434
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# FluentCMS Web Api

src/Backend/Repositories/FluentCMS.Repositories.Abstractions/FluentCMS.Repositories.Abstractions.csproj

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,22 @@
33
<TargetFramework>net9.0</TargetFramework>
44
<ImplicitUsings>disable</ImplicitUsings>
55
<Nullable>enable</Nullable>
6+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
7+
<PackageId>FluentCMS.Repositories.Abstractions</PackageId>
8+
<Version>0.0.1</Version>
9+
<Authors>Amir Pournasserian</Authors>
10+
<Company>FluentCMS</Company>
11+
<Description>Repositories abstractions.</Description>
12+
<PackageTags>fluentcms;cms;core;repository</PackageTags>
13+
<RepositoryUrl>https://github.com/fluentcms/FluentCMS</RepositoryUrl>
14+
<PackageProjectUrl>https://fluentcms.com</PackageProjectUrl>
15+
<PackageIcon>icon.png</PackageIcon>
16+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
17+
<PackageReadmeFile>README.md</PackageReadmeFile>
618
</PropertyGroup>
719
<ItemGroup>
20+
<None Include="..\..\..\icon.png" Pack="true" PackagePath="icon.png" />
21+
<None Include="README.md" Pack="true" PackagePath="README.md" />
822
<ProjectReference Include="..\..\FluentCMS.Entities\FluentCMS.Entities.csproj" />
923
</ItemGroup>
10-
</Project>
24+
</Project>

0 commit comments

Comments
 (0)