-
-
Notifications
You must be signed in to change notification settings - Fork 22
46 lines (44 loc) · 2.04 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: deploy
on:
push:
branches: [main, master]
jobs:
deploy-to-tencent-cos:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup dotnet-script
run: dotnet tool install --global dotnet-script
- name: Pre-Process
run: dotnet script .github/preProcess/MauiEnvConfig.csx
- name: Install Workloads
run: dotnet workload install maui-windows
- name: Create Folders need
run: |
mkdir D:\a\installer
mkdir D:\a\publish
- name: Copy THUAI7
run: Copy-Item -recurse D:\a\THUAI7\THUAI7\ D:\a\mirror\
- name: Remove directories not needed
run: |
Remove-Item -recurse -force D:\a\mirror\.git
Remove-Item -recurse D:\a\mirror\.github
Remove-Item -recurse D:\a\mirror\installer
Remove-Item -recurse D:\a\mirror\interface
Remove-Item -recurse D:\a\mirror\logic
- name: Build Server
run: |
mkdir D:\a\mirror\logic
dotnet build "./logic/Server/Server.csproj" -o "D:\a\mirror\logic\Server" -p:WindowsAppSDKSelfContained=true -c Release
- name: Build Client
run: dotnet publish "./logic/Client/Client.csproj" -o "D:\a\mirror\logic\Client" -f net8.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64 -p:WindowsPackageType=None -p:WindowsAppSDKSelfContained=true
- name: Deploy to bucket
run: dotnet run --project "./dependency/deploy/deploy.csproj" ${{ secrets.INSTALLER_COS_SECRET_ID }} ${{ secrets.INSTALLER_COS_SECRET_KEY }} "check"
- name: Get installer package(No Key contained for safety)
run: |
dotnet publish "./installer/installer.csproj" -o "D:\a\publish" -f net8.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64 -p:WindowsPackageType=None -p:WindowsAppSDKSelfContained=true
dotnet run --project "./dependency/deploy/deploy.csproj" ${{ secrets.INSTALLER_COS_SECRET_ID }} ${{ secrets.INSTALLER_COS_SECRET_KEY }} "upload"