Compare commits

...

4 Commits

Author SHA1 Message Date
lxmou666 ee099fd68c 更新 .gitea/workflows/deploy-server.yml
deploy-client / deploy (push) Successful in 5s Details
deploy-server / deploy (push) Successful in 5s Details
2026-06-11 09:57:02 +08:00
lxmou666 9067342a49 更新 .gitea/workflows/deploy-client.yml 2026-06-11 09:56:48 +08:00
lxmou666 127e997200 更新 .gitea/workflows/deploy-client.yml
deploy-server / deploy (push) Successful in 8s Details
2026-06-11 00:35:08 +08:00
lxmou666 0b6c6e60c7 更新 .gitea/workflows/deploy-server.yml 2026-06-11 00:34:56 +08:00
2 changed files with 12 additions and 10 deletions

View File

@ -6,7 +6,7 @@ name: deploy-client
on:
push:
tags:
- 'deploy-cv*.*.*'
- 'deploy-cv*.*.*.*'
jobs:
deploy:
@ -20,10 +20,10 @@ jobs:
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
# 从触发标签解析版本号: deploy-cv1.2.3 -> 1.2.3
# 从触发标签解析版本号: deploy-cv1.2.3.4 -> 1.2.3.4
$deployTag = '${{ github.ref_name }}'
if (-not ($deployTag -match '^deploy-cv(\d+\.\d+\.\d+)$')) {
throw "Trigger tag '$deployTag' must match deploy-cvx.x.x."
if (-not ($deployTag -match '^deploy-cv(\d+\.\d+\.\d+\.\d+)$')) {
throw "Trigger tag '$deployTag' must match deploy-cvx.x.x.x."
}
$version = $Matches[1]
@ -104,7 +104,8 @@ jobs:
}
$innerZipPath = Join-Path -Path $targetDir -ChildPath "HighErpAgent-v$version-deploy.zip"
Write-Host "Extracting $assetName -> $targetDir"
& $sevenZipPath x "$encryptedZipPath" -p"$env:DEPLOY_ZIP_PASSWORD" -o"$targetDir" -aoa
& $sevenZipPath x "$encryptedZipPath" -p"$env:DEPLOY_ZIP_PASSWORD" -o"$targetDir" -aoa *>&1 | Out-Null
if ($LASTEXITCODE -ne 0) { throw "7z extraction failed (exit code $LASTEXITCODE)." }
if (-not (Test-Path -Path $innerZipPath)) { throw "Inner deploy zip not found after extracting '$assetName': '$innerZipPath'." }
Write-Host "Expanding inner zip -> $targetDir"

View File

@ -6,7 +6,7 @@ name: deploy-server
on:
push:
tags:
- 'deploy-sv*.*.*'
- 'deploy-sv*.*.*.*'
jobs:
deploy:
@ -20,10 +20,10 @@ jobs:
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
# 从触发标签解析版本号: deploy-sv1.2.3 -> 1.2.3
# 从触发标签解析版本号: deploy-sv1.2.3.4 -> 1.2.3.4
$deployTag = '${{ github.ref_name }}'
if (-not ($deployTag -match '^deploy-sv(\d+\.\d+\.\d+)$')) {
throw "Trigger tag '$deployTag' must match deploy-svx.x.x."
if (-not ($deployTag -match '^deploy-sv(\d+\.\d+\.\d+\.\d+)$')) {
throw "Trigger tag '$deployTag' must match deploy-svx.x.x.x."
}
$version = $Matches[1]
@ -107,7 +107,8 @@ jobs:
}
Write-Host "Extracting $assetName -> $deployRoot"
& $sevenZipPath x "$encryptedZipPath" -p"$env:DEPLOY_ZIP_PASSWORD" -o"$deployRoot" -aoa
& $sevenZipPath x "$encryptedZipPath" -p"$env:DEPLOY_ZIP_PASSWORD" -o"$deployRoot" -aoa *>&1 | Out-Null
if ($LASTEXITCODE -ne 0) { throw "7z extraction failed (exit code $LASTEXITCODE)." }
Remove-Item -Path $encryptedZipPath -Force
Write-Host "Starting service $serviceName"