mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
ci.修改使用 GitHub Action 的 Upload Artifacts 配置
This commit is contained in:
8
.github/workflows/maa-dev-build.yaml
vendored
8
.github/workflows/maa-dev-build.yaml
vendored
@@ -20,5 +20,9 @@ jobs:
|
||||
|
||||
- name: Run dev build task
|
||||
run: pwsh .\ci-dev-build.ps1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Dev Build Bundles
|
||||
path: ./artifacts
|
||||
|
||||
@@ -57,22 +57,5 @@ public sealed class DevBuildTask : FrostingTask<MaaBuildContext>
|
||||
context.CopyThirdPartyDlls(releaseCiOutput);
|
||||
context.CopyResources(releaseCiOutput);
|
||||
ZipFile.CreateFromDirectory(releaseCiOutput, releaseCiArtifact);
|
||||
|
||||
context.Information("--------------------------------------------------");
|
||||
context.Information("5. Upload Artifacts");
|
||||
context.Information("--------------------------------------------------");
|
||||
|
||||
var gh = context.GitHubActions();
|
||||
if (gh.IsRunningOnGitHubActions)
|
||||
{
|
||||
context.Information("Upload artifacts to GitHub Actions");
|
||||
gh.Commands.UploadArtifact(Cake.Core.IO.FilePath.FromString(releaseArtifact), artifact.Replace("(CONF)", "Release")).Wait();
|
||||
gh.Commands.UploadArtifact(Cake.Core.IO.FilePath.FromString(releaseDebugArtifact), artifact.Replace("(CONF)", "RelWithDebInfo")).Wait();
|
||||
gh.Commands.UploadArtifact(Cake.Core.IO.FilePath.FromString(releaseCiArtifact), artifact.Replace("(CONF)", "CICD")).Wait();
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Information("Skip");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,20 +83,5 @@ public sealed class ReleaseCoreTask : FrostingTask<MaaBuildContext>
|
||||
ZipFile.CreateFromDirectory(buildOutput, bundle);
|
||||
|
||||
context.Information($"Bundled MAACore DLLs file: {bundle}");
|
||||
|
||||
context.Information("--------------------------------------------------");
|
||||
context.Information("6. Upload Artifact");
|
||||
context.Information("--------------------------------------------------");
|
||||
|
||||
var gh = context.GitHubActions();
|
||||
if (gh.IsRunningOnGitHubActions)
|
||||
{
|
||||
context.Information("Upload artifacts to GitHub Actions");
|
||||
gh.Commands.UploadArtifact(Cake.Core.IO.FilePath.FromString(bundle), $"MaaCore-{version}.zip").Wait();
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Information("Skip");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,20 +39,5 @@ public sealed class ReleaseResourceTask : FrostingTask<MaaBuildContext>
|
||||
ZipFile.CreateFromDirectory(resDir, bundle);
|
||||
|
||||
context.Information($"Bundled MaaResource file: {bundle}");
|
||||
|
||||
context.Information("--------------------------------------------------");
|
||||
context.Information("4. Upload Artifact");
|
||||
context.Information("--------------------------------------------------");
|
||||
|
||||
var gh = context.GitHubActions();
|
||||
if (gh.IsRunningOnGitHubActions)
|
||||
{
|
||||
context.Information("Upload artifacts to GitHub Actions");
|
||||
gh.Commands.UploadArtifact(Cake.Core.IO.FilePath.FromString(bundle), $"MaaResource-{version}.zip").Wait();
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Information("Skip");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,20 +42,5 @@ public sealed class ReleaseWpfTask : FrostingTask<MaaBuildContext>
|
||||
ZipFile.CreateFromDirectory(buildOutput, bundle);
|
||||
|
||||
context.Information($"Bundled MaaWpf Executables file: {bundle}");
|
||||
|
||||
context.Information("--------------------------------------------------");
|
||||
context.Information("5. Upload Artifact");
|
||||
context.Information("--------------------------------------------------");
|
||||
|
||||
var gh = context.GitHubActions();
|
||||
if (gh.IsRunningOnGitHubActions)
|
||||
{
|
||||
context.Information("Upload artifacts to GitHub Actions");
|
||||
gh.Commands.UploadArtifact(Cake.Core.IO.FilePath.FromString(bundle), $"MaaWpf-{version}.zip").Wait();
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Information("Skip");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user