Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
CHKZL committed Sep 3, 2024
1 parent 97954a2 commit d8fc083
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 23 deletions.
40 changes: 34 additions & 6 deletions .github/workflows/DDTV_Dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,23 @@ jobs:
with:
fetch-depth: 0

- name: Use .NET 8.0.303
- name: Remove all .NET SDKs
if: runner.os != 'Windows'
run: sudo rm -rf /usr/share/dotnet/sdk/*

- name: Remove all .NET SDKs (Windows)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\Program Files\dotnet\sdk\*"
shell: pwsh

- name: Setup .NET 8.0.303
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.303'

- name: Check .NET SDK version
run: dotnet --version

- name: Download and extract latest release (Linux or macOS)
if: runner.os != 'Windows'
run: |
Expand Down Expand Up @@ -115,7 +127,7 @@ jobs:
$current_time = $beijingTime.ToString("HH:mm:ss")
$combined_date_time = "$current_date $current_time"
Write-Output $combined_date_time
(Get-Content Core/Init.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
(Get-Content Core/Config.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
- name: Replace VerString (Linux or macOS)
if: runner.os != 'Windows'
Expand Down Expand Up @@ -259,11 +271,19 @@ jobs:
with:
fetch-depth: 0

- name: Use .NET 8.0.303
- name: Remove all .NET SDKs (Windows)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\Program Files\dotnet\sdk\*"
shell: pwsh

- name: Setup .NET 8.0.303
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.303'

- name: Check .NET SDK version
run: dotnet --version

- name: Download and extract latest release (Windows)
if: runner.os == 'Windows'
run: |
Expand Down Expand Up @@ -296,7 +316,7 @@ jobs:
$current_time = $beijingTime.ToString("HH:mm:ss")
$combined_date_time = "$current_date $current_time"
Write-Output $combined_date_time
(Get-Content Core/Init.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
(Get-Content Core/Config.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
- name: Replace VerString (Windows)
if: runner.os == 'Windows'
Expand Down Expand Up @@ -399,11 +419,19 @@ jobs:
with:
fetch-depth: 0

- name: Use .NET 8.0.303
- name: Remove all .NET SDKs (Windows)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\Program Files\dotnet\sdk\*"
shell: pwsh

- name: Setup .NET 8.0.303
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.303'

- name: Check .NET SDK version
run: dotnet --version

- name: Download and extract latest release (Windows)
if: runner.os == 'Windows'
run: |
Expand Down Expand Up @@ -436,7 +464,7 @@ jobs:
$current_time = $beijingTime.ToString("HH:mm:ss")
$combined_date_time = "$current_date $current_time"
Write-Output $combined_date_time
(Get-Content Core/Init.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
(Get-Content Core/Config.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
- name: Replace VerString (Windows)
if: runner.os == 'Windows'
Expand Down
34 changes: 31 additions & 3 deletions .github/workflows/DDTV_Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,23 @@ jobs:
with:
fetch-depth: 0

- name: Use .NET 8.0.303
- name: Remove all .NET SDKs
if: runner.os != 'Windows'
run: sudo rm -rf /usr/share/dotnet/sdk/*

- name: Remove all .NET SDKs (Windows)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\Program Files\dotnet\sdk\*"
shell: pwsh

- name: Setup .NET 8.0.303
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.303'

- name: Check .NET SDK version
run: dotnet --version

- name: Download and extract latest release (Linux or macOS)
if: runner.os != 'Windows'
run: |
Expand Down Expand Up @@ -251,11 +263,19 @@ jobs:
with:
fetch-depth: 0

- name: Use .NET 8.0.303
- name: Remove all .NET SDKs (Windows)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\Program Files\dotnet\sdk\*"
shell: pwsh

- name: Setup .NET 8.0.303
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.303'

- name: Check .NET SDK version
run: dotnet --version

- name: Download and extract latest release (Windows)
if: runner.os == 'Windows'
run: |
Expand Down Expand Up @@ -380,11 +400,19 @@ jobs:
with:
fetch-depth: 0

- name: Use .NET 8.0.303
- name: Remove all .NET SDKs (Windows)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\Program Files\dotnet\sdk\*"
shell: pwsh

- name: Setup .NET 8.0.303
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.303'

- name: Check .NET SDK version
run: dotnet --version

- name: Download and extract latest release (Windows)
if: runner.os == 'Windows'
run: |
Expand Down
56 changes: 42 additions & 14 deletions .github/workflows/DDTV_Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,23 @@ jobs:
with:
fetch-depth: 0

- name: Use .NET 8.0.303
- name: Remove all .NET SDKs
if: runner.os != 'Windows'
run: sudo rm -rf /usr/share/dotnet/sdk/*

- name: Remove all .NET SDKs (Windows)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\Program Files\dotnet\sdk\*"
shell: pwsh

- name: Setup .NET 8.0.303
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.303'

- name: Check .NET SDK version
run: dotnet --version

- name: Download and extract latest release (Linux or macOS)
if: runner.os != 'Windows'
run: |
Expand Down Expand Up @@ -115,7 +127,7 @@ jobs:
$current_time = $beijingTime.ToString("HH:mm:ss")
$combined_date_time = "$current_date $current_time"
Write-Output $combined_date_time
(Get-Content Core/Init.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
(Get-Content Core/Config.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
- name: Replace VerString (Linux or macOS)
if: runner.os != 'Windows'
Expand Down Expand Up @@ -259,11 +271,19 @@ jobs:
with:
fetch-depth: 0

- name: Use .NET 8.0.303
- name: Remove all .NET SDKs (Windows)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\Program Files\dotnet\sdk\*"
shell: pwsh

- name: Setup .NET 8.0.303
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.303'

- name: Check .NET SDK version
run: dotnet --version

- name: Download and extract latest release (Windows)
if: runner.os == 'Windows'
run: |
Expand Down Expand Up @@ -308,7 +328,7 @@ jobs:
$current_time = $beijingTime.ToString("HH:mm:ss")
$combined_date_time = "$current_date $current_time"
Write-Output $combined_date_time
(Get-Content Core/Init.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
(Get-Content Core/Config.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
shell: pwsh

Expand Down Expand Up @@ -400,11 +420,19 @@ jobs:
with:
fetch-depth: 0

- name: Use .NET 8.0.303
- name: Remove all .NET SDKs (Windows)
if: runner.os == 'Windows'
run: Remove-Item -Recurse -Force "C:\Program Files\dotnet\sdk\*"
shell: pwsh

- name: Setup .NET 8.0.303
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.303'

- name: Check .NET SDK version
run: dotnet --version

- name: Download and extract latest release (Windows)
if: runner.os == 'Windows'
run: |
Expand All @@ -429,15 +457,15 @@ jobs:
Write-Output $combined_date_time
(Get-Content Core/Init.cs) -replace 'CompilationTime', $combined_date_time | Set-Content Core/Init.cs
- name: Modify default update mode (Linux or macOS)
if: runner.os != 'Windows'
run: |
export TZ='Asia/Shanghai'
current_date=$(date +%Y-%m-%d)
current_time=$(date +%H:%M:%S)
combined_date_time="${current_date} ${current_time}"
echo ${combined_date_time}
sed -i.bak 's/string DevelopmentVersion = "false"/string DevelopmentVersion = "true"/g' Core/Config.cs
- name: Modify default update mode (Windows)
if: runner.os == 'Windows'
run: |
$beijingTime = [System.TimeZoneInfo]::ConvertTimeFromUtc((Get-Date).ToUniversalTime(), [System.TimeZoneInfo]::FindSystemTimeZoneById('China Standard Time'))
$current_date = $beijingTime.ToString("yyyy-MM-dd")
$current_time = $beijingTime.ToString("HH:mm:ss")
$combined_date_time = "$current_date $current_time"
Write-Output $combined_date_time
(Get-Content Core/Config.cs) -replace 'string DevelopmentVersion = "false"', 'string DevelopmentVersion = "true"' | Set-Content Core/Config.cs
- name: Replace VerString (Windows)
if: runner.os == 'Windows'
Expand Down

0 comments on commit d8fc083

Please sign in to comment.