Skip to content

Commit 0f8f159

Browse files
authored
Merge pull request #35 from bogdanbrudiu/features/AddEvent
Features/add event
2 parents 4164df2 + 3e0ae57 commit 0f8f159

File tree

7 files changed

+51
-35
lines changed

7 files changed

+51
-35
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,21 @@ jobs:
1515
- uses: actions/checkout@v3
1616
with:
1717
submodules: recursive
18-
- name: Commit and push changes
19-
run: |
20-
git config --global user.name "CD bot"
21-
git config --global user.email ""
22-
echo %date% %time% >> App_Data\dbtestfile.txt
23-
git add App_Data\dbtestfile.txt
24-
git commit -m "update db file [skip actions]"
25-
git push
18+
2619
- name: Setup .NET
2720
uses: actions/setup-dotnet@v3
2821
with:
2922
dotnet-version: 6.0.x
23+
3024
- name: Restore dependencies
3125
run: dotnet restore
26+
3227
- name: Build
33-
run: dotnet build --no-restore
28+
run: dotnet build --no-restore
29+
3430
- name: Test
3531
run: dotnet test --no-build --verbosity normal
32+
3633
- name: App Settings Variable Substitution
3734
uses: microsoft/variable-substitution@v1
3835
with:
@@ -45,39 +42,58 @@ jobs:
4542
MailerSettings.Port: ${{ secrets.MAILER_SETTINGS_PORT }}
4643
MailerSettings.EnableSSL: ${{ secrets.MAILER_SETTINGS_ENABLESSL }}
4744
Token.Secret: ${{ secrets.TOKEN_SECRET }}
48-
- name: Publish
49-
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
45+
5046
- name: Stop App Pool
51-
uses: bogdanbrudiu/simply-web-deploy/Stop@7f9e096
47+
uses: bogdanbrudiu/simply-web-deploy/Stop@main
5248
with:
5349
website-name: ${{ secrets.WEBSITE_NAME }}
5450
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
5551
server-username: ${{ secrets.SERVER_USERNAME }}
5652
server-password: ${{ secrets.SERVER_PASSWORD }}
53+
5754
- name: Fetch App Pool
58-
uses: bogdanbrudiu/simply-web-deploy/Fetch@7f9e096
55+
uses: bogdanbrudiu/simply-web-deploy/Fetch@main
5956
with:
6057
website-name: ${{ secrets.WEBSITE_NAME }}
6158
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
6259
server-username: ${{ secrets.SERVER_USERNAME }}
6360
server-password: ${{ secrets.SERVER_PASSWORD }}
61+
target-path: '\fetched\'
62+
source-path: '""'
63+
6464
- name: Backup DB
6565
run: |
6666
git config --global user.name "CD bot"
6767
git config --global user.email ""
68-
echo %date% %time% >> App_Data\dbtestfile_.txt
69-
git add App_Data\dbtestfile.txt
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
7073
git commit -m "update db file [skip actions]"
71-
git push
74+
75+
- name: Push change
76+
uses: ad-m/github-push-action@master
77+
with:
78+
github_token: ${{ secrets.GITHUB_TOKEN }}
79+
branch: ${{ github.ref }}
80+
81+
- name: Publish
82+
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
83+
84+
7285
- name: Deploy App Pool
73-
uses: bogdanbrudiu/simply-web-deploy/Deploy@7f9e096
86+
uses: bogdanbrudiu/simply-web-deploy/Deploy@main
7487
with:
7588
website-name: ${{ secrets.WEBSITE_NAME }}
7689
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}
7790
server-username: ${{ secrets.SERVER_USERNAME }}
7891
server-password: ${{ secrets.SERVER_PASSWORD }}
92+
target-path: '\wwwroot\'
93+
source-path: '\publish\'
94+
7995
- name: Start App Pool
80-
uses: bogdanbrudiu/simply-web-deploy/Start@7f9e096
96+
uses: bogdanbrudiu/simply-web-deploy/Start@main
8197
with:
8298
website-name: ${{ secrets.WEBSITE_NAME }}
8399
server-computer-name: ${{ secrets.SERVER_COMPUTER_NAME }}

HamEvent/App_Data/QSOs.db

4 KB
Binary file not shown.

HamEvent/App_Data/dbbackup_log

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

HamEvent/App_Data/dbtestfile.txt

Whitespace-only changes.

HamEvent/HamEvent.csproj

Lines changed: 8 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>
@@ -11,19 +11,18 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="AutoMapper" Version="12.0.1" />
15-
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
14+
<PackageReference Include="AutoMapper" Version="14.0.0" />
1615
<PackageReference Include="elmahcore" Version="2.1.2" />
17-
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="7.0.5" />
18-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.5" />
19-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.5" />
20-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.5">
16+
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="9.0.4" />
17+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.4" />
18+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.4" />
19+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.4">
2120
<PrivateAssets>all</PrivateAssets>
2221
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2322
</PackageReference>
2423
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
25-
<PackageReference Include="NReco.Logging.File" Version="1.2.1" />
26-
<PackageReference Include="Select.HtmlToPdf.NetCore" Version="23.1.0" />
24+
<PackageReference Include="NReco.Logging.File" Version="1.2.2" />
25+
<PackageReference Include="Select.HtmlToPdf.NetCore" Version="25.1.0" />
2726
</ItemGroup>
2827

2928
<ItemGroup>

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>

0 commit comments

Comments
 (0)