Skip to content

Commit 5ce41db

Browse files
committed
merge from main
2 parents ba30e48 + 1ca00e8 commit 5ce41db

File tree

8 files changed

+126
-21
lines changed

8 files changed

+126
-21
lines changed

.github/workflows/build.yml

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@ jobs:
1515
- uses: actions/checkout@v3
1616
with:
1717
submodules: recursive
18+
1819
- name: Setup .NET
1920
uses: actions/setup-dotnet@v3
2021
with:
2122
dotnet-version: 6.0.x
23+
2224
- name: Restore dependencies
2325
run: dotnet restore
26+
2427
- name: Build
25-
run: dotnet build --no-restore
28+
run: dotnet build --no-restore
29+
2630
- name: Test
2731
run: dotnet test --no-build --verbosity normal
32+
2833
- name: App Settings Variable Substitution
2934
uses: microsoft/variable-substitution@v1
3035
with:
@@ -37,14 +42,63 @@ jobs:
3742
MailerSettings.Port: ${{ secrets.MAILER_SETTINGS_PORT }}
3843
MailerSettings.EnableSSL: ${{ secrets.MAILER_SETTINGS_ENABLESSL }}
3944
Token.Secret: ${{ secrets.TOKEN_SECRET }}
45+
46+
- name: Stop App Pool
47+
uses: bogdanbrudiu/simply-web-deploy/Stop@main
48+
with:
49+
website-name: ${{ secrets.WEBSITE_NAME }}
50+
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
51+
server-username: ${{ secrets.SERVER_USERNAME }}
52+
server-password: ${{ secrets.SERVER_PASSWORD }}
53+
54+
- name: Fetch App Pool
55+
uses: bogdanbrudiu/simply-web-deploy/Fetch@main
56+
with:
57+
website-name: ${{ secrets.WEBSITE_NAME }}
58+
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
59+
server-username: ${{ secrets.SERVER_USERNAME }}
60+
server-password: ${{ secrets.SERVER_PASSWORD }}
61+
target-path: '\fetched\'
62+
source-path: '""'
63+
64+
- name: Backup DB
65+
run: |
66+
git config --global user.name "CD bot"
67+
git config --global user.email ""
68+
copy fetched/App_Data/QSOs.db HamEvent/App_Data/QSOs.db
69+
$NOW=& Get-Date -format yyyy-MM-dd
70+
echo "New backup done on $NOW" >> HamEvent/App_Data/dbbackup_log
71+
git add HamEvent/App_Data/QSOs.db
72+
git add HamEvent/App_Data/dbbackup_log
73+
git commit -m "update db file [skip actions]"
74+
75+
- name: Push change
76+
if: ${{ github.ref!='refs/heads/main' }}
77+
uses: ad-m/github-push-action@master
78+
with:
79+
github_token: ${{ secrets.GITHUB_TOKEN }}
80+
branch: ${{ github.ref }}
81+
4082
- name: Publish
41-
run: dotnet publish HamEvent/HamEvent.csproj --configuration Release --framework net7.0 --output ./publish --runtime win-x64 --self-contained true -p:PublishTrimmed=false -p:PublishSingleFile=false
42-
- name: Deploy
43-
uses: rasmusbuchholdt/[email protected]
83+
run: dotnet publish HamEvent/HamEvent.csproj --configuration Release --framework net8.0 --output ./publish --runtime win-x64 --self-contained true -p:PublishTrimmed=false -p:PublishSingleFile=false
84+
85+
86+
- name: Deploy App Pool
87+
uses: bogdanbrudiu/simply-web-deploy/Deploy@main
4488
with:
4589
website-name: ${{ secrets.WEBSITE_NAME }}
4690
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
4791
server-username: ${{ secrets.SERVER_USERNAME }}
4892
server-password: ${{ secrets.SERVER_PASSWORD }}
49-
# skip-directory-path: '\\App_Data'
93+
target-path: '\wwwroot\'
94+
source-path: '\publish\'
95+
96+
- name: Start App Pool
97+
uses: bogdanbrudiu/simply-web-deploy/Start@main
98+
with:
99+
website-name: ${{ secrets.WEBSITE_NAME }}
100+
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
101+
server-username: ${{ secrets.SERVER_USERNAME }}
102+
server-password: ${{ secrets.SERVER_PASSWORD }}
103+
50104

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "CoreMailer"]
55
path = CoreMailer
66
url = https://github.com/riyasat/CoreMailer.git
7+
[submodule "simply-web-deploy"]
8+
path = simply-web-deploy
9+
url = https://github.com/bogdanbrudiu/simply-web-deploy.git

HamEvent/App_Data/QSOs.db

0 Bytes
Binary file not shown.

HamEvent/App_Data/dbbackup_log

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
New backup done on 2025-05-09
2+
New backup done on 2025-05-09

HamEvent/HamEvent.csproj

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<IsPackable>false</IsPackable>
77
<SpaRoot>ClientApp\</SpaRoot>
@@ -12,20 +12,23 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="AdifLib" Version="1.6.3" />
15-
<PackageReference Include="AutoMapper" Version="12.0.1" />
16-
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
15+
<PackageReference Include="AutoMapper" Version="14.0.0" />
1716
<PackageReference Include="CoreMailer" Version="3.0.0" />
1817
<PackageReference Include="elmahcore" Version="2.1.2" />
19-
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="7.0.5" />
20-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
21-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.5" />
22-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.5">
18+
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="9.0.4" />
19+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.4" />
20+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.4" />
21+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.4">
22+
<PrivateAssets>all</PrivateAssets>
23+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24+
</PackageReference>
25+
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.8.3">
2326
<PrivateAssets>all</PrivateAssets>
2427
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2528
</PackageReference>
2629
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
27-
<PackageReference Include="NReco.Logging.File" Version="1.2.1" />
28-
<PackageReference Include="Select.HtmlToPdf.NetCore" Version="23.1.0" />
30+
<PackageReference Include="NReco.Logging.File" Version="1.2.2" />
31+
<PackageReference Include="Select.HtmlToPdf.NetCore" Version="25.1.0" />
2932
</ItemGroup>
3033

3134
<ItemGroup>

HamEventMVP.sln

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,37 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "UnitTests\UnitTests.csproj", "{1A6792F1-7EF9-450C-AC1E-7FD26ACD8EAD}"
1515
EndProject
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreMailer", "CoreMailer\CoreMailer\CoreMailer.csproj", "{3458928A-E6F3-4FA6-878B-B3729C14838B}"
17+
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "simply-web-deploy", "simply-web-deploy", "{6E07F384-23C4-43EC-BFB5-E34E871FB547}"
19+
EndProject
20+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{667EB339-38A6-4FB9-99E3-FFA71DB0787C}"
21+
ProjectSection(SolutionItems) = preProject
22+
simply-web-deploy\Scripts\Deploy-ApplicationPackage.ps1 = simply-web-deploy\Scripts\Deploy-ApplicationPackage.ps1
23+
simply-web-deploy\Scripts\Fetch-ApplicationPackage.ps1 = simply-web-deploy\Scripts\Fetch-ApplicationPackage.ps1
24+
simply-web-deploy\Scripts\Set-ApplicationPool.ps1 = simply-web-deploy\Scripts\Set-ApplicationPool.ps1
25+
EndProjectSection
26+
EndProject
27+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Stop", "Stop", "{125AB4CA-BD4C-4C8E-8F27-62CBAE73D044}"
28+
ProjectSection(SolutionItems) = preProject
29+
simply-web-deploy\Stop\action.yml = simply-web-deploy\Stop\action.yml
30+
EndProjectSection
31+
EndProject
32+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Start", "Start", "{60B93305-2A05-4B1D-9955-7AE4CBDD5112}"
33+
ProjectSection(SolutionItems) = preProject
34+
simply-web-deploy\Start\action.yml = simply-web-deploy\Start\action.yml
35+
EndProjectSection
36+
EndProject
37+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Fetch", "Fetch", "{2B2766AF-6421-432F-BD0F-6CC5E305F18C}"
38+
ProjectSection(SolutionItems) = preProject
39+
simply-web-deploy\Fetch\action.yml = simply-web-deploy\Fetch\action.yml
40+
EndProjectSection
41+
EndProject
42+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Deploy", "Deploy", "{AB17FE00-A9F2-4882-8FD3-8A919F010F9A}"
43+
ProjectSection(SolutionItems) = preProject
44+
simply-web-deploy\Deploy\action.yml = simply-web-deploy\Deploy\action.yml
45+
EndProjectSection
46+
EndProject
1647
Global
1748
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1849
Debug|Any CPU = Debug|Any CPU
@@ -27,10 +58,21 @@ Global
2758
{1A6792F1-7EF9-450C-AC1E-7FD26ACD8EAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
2859
{1A6792F1-7EF9-450C-AC1E-7FD26ACD8EAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
2960
{1A6792F1-7EF9-450C-AC1E-7FD26ACD8EAD}.Release|Any CPU.Build.0 = Release|Any CPU
61+
{3458928A-E6F3-4FA6-878B-B3729C14838B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
62+
{3458928A-E6F3-4FA6-878B-B3729C14838B}.Debug|Any CPU.Build.0 = Debug|Any CPU
63+
{3458928A-E6F3-4FA6-878B-B3729C14838B}.Release|Any CPU.ActiveCfg = Release|Any CPU
64+
{3458928A-E6F3-4FA6-878B-B3729C14838B}.Release|Any CPU.Build.0 = Release|Any CPU
3065
EndGlobalSection
3166
GlobalSection(SolutionProperties) = preSolution
3267
HideSolutionNode = FALSE
3368
EndGlobalSection
69+
GlobalSection(NestedProjects) = preSolution
70+
{667EB339-38A6-4FB9-99E3-FFA71DB0787C} = {6E07F384-23C4-43EC-BFB5-E34E871FB547}
71+
{125AB4CA-BD4C-4C8E-8F27-62CBAE73D044} = {6E07F384-23C4-43EC-BFB5-E34E871FB547}
72+
{60B93305-2A05-4B1D-9955-7AE4CBDD5112} = {6E07F384-23C4-43EC-BFB5-E34E871FB547}
73+
{2B2766AF-6421-432F-BD0F-6CC5E305F18C} = {6E07F384-23C4-43EC-BFB5-E34E871FB547}
74+
{AB17FE00-A9F2-4882-8FD3-8A919F010F9A} = {6E07F384-23C4-43EC-BFB5-E34E871FB547}
75+
EndGlobalSection
3476
GlobalSection(ExtensibilityGlobals) = postSolution
3577
SolutionGuid = {172F1AC0-54ED-4655-8A36-F090D38CBA73}
3678
EndGlobalSection

UnitTests/UnitTests.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

88
<IsPackable>false</IsPackable>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
13-
<PackageReference Include="Moq" Version="4.20.69" />
14-
<PackageReference Include="Moq.EntityFrameworkCore" Version="7.0.0.2" />
15-
<PackageReference Include="xunit" Version="2.4.2" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
13+
<PackageReference Include="Moq" Version="4.20.72" />
14+
<PackageReference Include="Moq.EntityFrameworkCore" Version="9.0.0.5" />
15+
<PackageReference Include="xunit" Version="2.9.3" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.0">
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
<PrivateAssets>all</PrivateAssets>
1919
</PackageReference>
20-
<PackageReference Include="coverlet.collector" Version="3.1.2">
20+
<PackageReference Include="coverlet.collector" Version="6.0.4">
2121
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2222
<PrivateAssets>all</PrivateAssets>
2323
</PackageReference>

simply-web-deploy

Submodule simply-web-deploy added at 2bd5dfb

0 commit comments

Comments
 (0)