From b36399f5724a561305acefb858ae79f04174507f Mon Sep 17 00:00:00 2001 From: Masterain Date: Wed, 3 Jan 2024 17:36:45 -0800 Subject: [PATCH 1/8] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e970a3fb..f5c49f8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,6 +61,9 @@ release: - name: "$THIS_SHA256SUMS_NAME" url: "https://$CI_SERVER_SHELL_SSH_HOST/$CI_PROJECT_PATH/-/jobs/$THIS_JOB_ID/artifacts/raw/$THIS_SHA256SUMS_NAME?inline=false" link_type: other + - name: "artifact_archive" + url: "https://$CI_SERVER_SHELL_SSH_HOST/$CI_PROJECT_PATH/-/jobs/$THIS_JOB_ID/artifacts/download?file_type=archive" + link_type: other Refresh: stage: refresh From a93eb505d6314a93e537f498cb462bf3f8718b7b Mon Sep 17 00:00:00 2001 From: Masterain Date: Sat, 6 Jan 2024 22:56:17 -0800 Subject: [PATCH 2/8] Update issue template --- .github/ISSUE_TEMPLATE/CHS-bug-report.yml | 4 ++-- .github/ISSUE_TEMPLATE/ENG-bug-report.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/CHS-bug-report.yml b/.github/ISSUE_TEMPLATE/CHS-bug-report.yml index 718d2bfe..6234c2bd 100644 --- a/.github/ISSUE_TEMPLATE/CHS-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/CHS-bug-report.yml @@ -51,7 +51,7 @@ body: description: | 在胡桃工具箱的设置界面,你可以找到并复制你的设备 ID 如果你的问题涉及程序崩溃,请填写该项,这将有助于我们定位问题 - 如果你的程序已经无法启动,请下载并运行[此工具](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe),它将显示你的设备 ID + 如果你的程序已经无法启动,请下载并运行[诊断工具](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe),它将显示你的设备 ID validations: required: false @@ -87,7 +87,7 @@ body: label: 发生了什么? description: | 详细的描述问题发生前后的行为,以便我们解决问题。**如果你的问题涉及程序崩溃,你应当检查 Windows 事件查看器,并将相关的 `.Net 错误`详情附上** - 如果你无法找到该日志,请下载并运行[此工具](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe),它将转储问题日志至工具运行目录中的 `Snap.Hutao Error Log.txt` + 如果你无法找到该日志,请下载并运行[诊断工具](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe),它将转储问题日志至工具运行目录中的 `Snap.Hutao Error Log.txt` validations: required: true diff --git a/.github/ISSUE_TEMPLATE/ENG-bug-report.yml b/.github/ISSUE_TEMPLATE/ENG-bug-report.yml index aa816f05..e3714460 100644 --- a/.github/ISSUE_TEMPLATE/ENG-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/ENG-bug-report.yml @@ -51,7 +51,7 @@ body: description: | In Snap Hutao's settings page, you can find and copy your device ID If your issue is about program crash, please fill this so we can dump the log and locate the source easier - If your program cannot startup, please download and run [this tool](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe), it will shows your device ID. + If your program cannot startup, please download and run [Diagnosis Tool](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe), it will shows your device ID. validations: required: false @@ -87,7 +87,7 @@ body: label: What Happened? description: | Describe your issue in detail to help us identify the issue. **If your issue is about program crash, you should check Windows Event Viewer, and attach associated `.Net Error` details here**If your program cannot startup, please download and run [this PowerShell script](https://github.com/DGP-Studio/ISSUE_TEMPLATES/releases/download/get_device_id/GetHutaoDeviceId.ps1), it will shows your device ID. - If you cannot find it, please download and run [this tool](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe), it will dump the error log to `Snap.Hutao Error Log.txt` in the working directory of the tool. + If you cannot find it, please download and run [Diagnosis Tool](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe), it will dump the error log to `Snap.Hutao Error Log.txt` in the working directory of the tool. validations: required: true From 94a5e71130935f024e0cf96677a81f171ce75c98 Mon Sep 17 00:00:00 2001 From: DismissedLight <1686188646@qq.com> Date: Thu, 11 Jan 2024 19:20:34 +0800 Subject: [PATCH 3/8] Update translations (#1294) Co-authored-by: Masterain --- .../Resource/Localization/SH.en.resx | 12 ++-- .../Resource/Localization/SH.ja.resx | 62 +++++++++---------- .../Resource/Localization/SH.zh-Hant.resx | 16 ++--- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.en.resx b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.en.resx index 6de46966..49d8093d 100644 --- a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.en.resx +++ b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.en.resx @@ -738,10 +738,10 @@ Avatar Calculator: {0:MM-dd HH:mm} - My Character: Not Refreshed + Battle Chronicle: Not Refreshed - My Characters: {0:MM-dd HH:mm} + Battle Chronicle: {0:MM-dd HH:mm} Enka: N/A @@ -1728,7 +1728,7 @@ Sync character talents data - Sync from MiHoYo BBS My Character + Sync from MiHoYo BBS Battle Chronicle Sync most data other than character talent @@ -2475,7 +2475,7 @@ After a full reading of the Genshin Impact and Snap Hutao user agreements, I choose to enable「Game Launcher - Advanced Features」. - Enable Advanced Features + Advanced Features Change Auto Click Shortcut @@ -2925,7 +2925,7 @@ {0} Seconds - Verification failed. Please check MiHoYo BBS - My Character - Realtime Notes manually + Verification failed. Please check MiHoYo BBS - Toolbox - Realtime Notes manually Wrong UID format @@ -2994,7 +2994,7 @@ Snap Hutao server is under maintenance - Verification failed. Please verify manually or check MiHoYo BBS - My Characters page + Verification failed. Please verify manually or check MiHoYo BBS - Battle Chronicle page Return Code: {0} | Message: {1} diff --git a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.ja.resx b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.ja.resx index 8f949470..bf856477 100644 --- a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.ja.resx +++ b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.ja.resx @@ -738,10 +738,10 @@ 育成計算: {0:MM-dd HH:mm} - 原神战绩:尚未刷新 + 原神の記録: 更新していません - 原神战绩:{0:MM-dd HH:mm} + 原神の記録:{0:MM-dd HH:mm} キャラクターラインナップ:未更新 @@ -870,22 +870,22 @@ ファイル書き込みの権限が無いため、サーバー変換機能を使用できません - 下载游戏资源索引 + ゲームリソースのインデックスをダウンロード ゲームファイルの操作に失敗しました。: {0} - 解锁帧率上限失败 + FPS上限の解放に失敗しました - 游戏进程运行中 + ゲームは実行中です - 请选择游戏路径 + ゲームのパスを選択してください - 下载游戏资源索引失败: {0} + ゲームリソースのインデックスのダウンロードに失敗しました: {0} ゲームプロセスが終了しました @@ -1284,10 +1284,10 @@ MiHoYo BBS を使用して QR コードをスキャンします - 为防止你在无意间启用,请输入正在启用的功能开关的<b>标题名称</b> + 謝って有効にしないようにするためには、有効にする機能の<b>タイトル名</b>を入力してください - 你正在启用一个危险功能 + 危険な機能を有効にしています この操作は取り消せません。すべてのユーザーのログイン状態が解除されます。 @@ -1311,7 +1311,7 @@ クッキーを設定 - 反馈中心 + フィードバック センター 祈願履歴 @@ -1563,7 +1563,7 @@ サーバーの切り替えができませんでした - 识别显示器 + モニターの識別 ゲーム設定ファイル {0} の読み込みに失敗しました。ファイルが無いか、権限が不足している可能性があります。 @@ -1599,10 +1599,10 @@ デスクトップへのショートカット作成に失敗しました - 后续转换会重新下载所需的文件,确定要删除吗? + 必要なファイルを再度ダウンロードする必要があります、削除してもよろしいですか? - 删除转换服务器游戏客户端缓存 + サーバー変換用キャッシュファイルの削除 使用済みディスク容量: {0} @@ -1728,7 +1728,7 @@ キャラクターの天賦情報を同期 - 从米游社原神战绩同步 + MiHoYo BBSから原神の記録を同期 キャラ天賦以外の情報を概ね同期 @@ -1854,34 +1854,34 @@ 現在のユーザーとUIDを確認する - 搜索问题与建议 + 質問や提案を検索 - 基本信息 + 基本情報 - 常用链接 + よく使われるリンク - 与我们密切联系 + 引き続き連絡をしてください - 功能指南 + 機能ガイド - 我们总是优先处理 GitHub 上的问题 + Githubでは報告された問題を常に優先しています - 开发路线规划 + 開発ロードマップ - 暂无搜索结果 + 検索結果はありません - 胡桃服务可用性监控 + 胡桃のサービス状態 - 胡桃服务 + 胡桃サービス すべて更新 @@ -2631,16 +2631,16 @@ デバッグコンソール - 在启动游戏中转换服务器后会产生对应的游戏客户端文件用作缓存 + サーバー変換を使用すると、対応するサーバーのゲームクライアントのキャッシュファイルが生成されます - 删除转换服务器缓存 + サーバー変換のキャッシュを削除 フォルダを開く - 设置 + 設定 キャラクター出場率 = この階層における出場回数(最初の一回のみカウント) / この階層のアップロード総数 @@ -2823,7 +2823,7 @@ {0} 時間後に終了 - 打开剪贴板失败 + クリップボードを開けませんでした クリップボードにコピーしました。 @@ -2925,7 +2925,7 @@ {0} 秒 - 验证失败,请手动验证或前往「米游社-旅行工具-原神战绩-实时便笺」页面查看 + 認証に失敗しました。「MiHoYo BBS - 戦績ツール - リアルタイムノート」で確認してください UIDは正しくありません @@ -2994,7 +2994,7 @@ 胡桃サーバがメンテナンス中です - 验证失败,请手动验证或前往「米游社-旅行工具-原神战绩」页面查看 + 認証に失敗しました。 手動で認証するか、MiHoYo BBS - 戦績 - マイ キャラクター を確認してください。 リターンコード:{0} | メッセージ:{1} @@ -3006,6 +3006,6 @@ [{0}] の[{1}] のリクエストにエラーが発生、時間をおいてから試してください - 显示器编号 + モニターID \ No newline at end of file diff --git a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.zh-Hant.resx b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.zh-Hant.resx index ce05d9dc..9e48b0de 100644 --- a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.zh-Hant.resx +++ b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.zh-Hant.resx @@ -738,10 +738,10 @@ 養成計算:{0:MM-dd HH:mm} - 原神战绩:尚未刷新 + 原神戰績:尚未更新 - 原神战绩:{0:MM-dd HH:mm} + 原神戰績:{0:MM-dd HH:mm} 角色櫥窗:尚未刷新 @@ -1284,7 +1284,7 @@ 使用米遊社掃描 QR 碼 - 为防止你在无意间启用,请输入正在启用的功能开关的<b>标题名称</b> + 為防止你在無意間啟用,請輸入正在啟用的功能開關的<b>標題名稱</b> 你正在啟用一個危險功能 @@ -1860,22 +1860,22 @@ 基本資訊 - 常用链接 + 常用連結 - 与我们密切联系 + 與我們密切聯繫 功能指南 - 我们总是优先处理 GitHub 上的问题 + 我們總是優先處理 GitHub 上的問題 - 开发路线规划 + 開發路線規劃 - 暂无搜索结果 + 暫無搜尋結果 胡桃服务可用性监控 From 279e107919a9e6681195e7d05ca782acdcfee6f1 Mon Sep 17 00:00:00 2001 From: qhy040404 <45379733+qhy040404@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:38:17 +0800 Subject: [PATCH 4/8] Update bug report template (#1317) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 更新 CHS-bug-report.yml * 更新 ENG-bug-report.yml --- .github/ISSUE_TEMPLATE/CHS-bug-report.yml | 4 ++-- .github/ISSUE_TEMPLATE/ENG-bug-report.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/CHS-bug-report.yml b/.github/ISSUE_TEMPLATE/CHS-bug-report.yml index 6234c2bd..f94906bc 100644 --- a/.github/ISSUE_TEMPLATE/CHS-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/CHS-bug-report.yml @@ -39,7 +39,7 @@ body: id: shver attributes: label: Snap Hutao 版本 - description: 在应用标题,应用程序的设置界面中靠下的位置可以找到 + description: 在应用标题,应用程序的反馈中心界面中可以找到 placeholder: 例:1.4.15.0 validations: required: true @@ -49,7 +49,7 @@ body: attributes: label: 设备 ID description: | - 在胡桃工具箱的设置界面,你可以找到并复制你的设备 ID + 在胡桃工具箱的反馈中心界面,你可以找到并复制你的设备 ID 如果你的问题涉及程序崩溃,请填写该项,这将有助于我们定位问题 如果你的程序已经无法启动,请下载并运行[诊断工具](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe),它将显示你的设备 ID validations: diff --git a/.github/ISSUE_TEMPLATE/ENG-bug-report.yml b/.github/ISSUE_TEMPLATE/ENG-bug-report.yml index e3714460..3a542b02 100644 --- a/.github/ISSUE_TEMPLATE/ENG-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/ENG-bug-report.yml @@ -49,7 +49,7 @@ body: attributes: label: Device ID description: | - In Snap Hutao's settings page, you can find and copy your device ID + In Snap Hutao's Feedback Center, you can find and copy your device ID If your issue is about program crash, please fill this so we can dump the log and locate the source easier If your program cannot startup, please download and run [Diagnosis Tool](https://github.com/DGP-Automation/ISSUE_TEMPLATES/releases/download/diagnosis_tools/Snap.Hutao.DiagTools.exe), it will shows your device ID. validations: From 5b109013a048ba089b42d7fb30e452cf52682c8b Mon Sep 17 00:00:00 2001 From: Masterain Date: Sun, 28 Jan 2024 01:40:54 -0800 Subject: [PATCH 5/8] add workflows for stale issues (#1330) --- .github/workflows/close_stale.yml | 16 +++++++++++++++ .github/workflows/lock_closed_issues.yml | 26 ++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/close_stale.yml create mode 100644 .github/workflows/lock_closed_issues.yml diff --git a/.github/workflows/close_stale.yml b/.github/workflows/close_stale.yml new file mode 100644 index 00000000..3d087ffe --- /dev/null +++ b/.github/workflows/close_stale.yml @@ -0,0 +1,16 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + any-of-labels: 'needs-more-info,需要更多信息' + stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 3 days.' + days-before-stale: 7 + days-before-close: 3 + close-issue-reason: not_planned \ No newline at end of file diff --git a/.github/workflows/lock_closed_issues.yml b/.github/workflows/lock_closed_issues.yml new file mode 100644 index 00000000..47200ada --- /dev/null +++ b/.github/workflows/lock_closed_issues.yml @@ -0,0 +1,26 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + discussions: write + +concurrency: + group: lock-threads + +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v5 + with: + issue-inactive-days: '30' + issue-comment: 'This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topic.' + issue-lock-reason: 'resolved' + process-only: 'issues' + log-output: false \ No newline at end of file From ae2415dbca1e5cc34aad21c5b9f643bf48337154 Mon Sep 17 00:00:00 2001 From: Masterain Date: Mon, 29 Jan 2024 18:17:37 -0800 Subject: [PATCH 6/8] Create issue_similarity.yml --- .github/workflows/issue_similarity.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/issue_similarity.yml diff --git a/.github/workflows/issue_similarity.yml b/.github/workflows/issue_similarity.yml new file mode 100644 index 00000000..a9af99a8 --- /dev/null +++ b/.github/workflows/issue_similarity.yml @@ -0,0 +1,20 @@ +name: Issues Similarity Analysis + +on: + issues: + types: [opened, edited] + +jobs: + similarity-analysis: + runs-on: ubuntu-latest + steps: + - name: analysis + uses: actions-cool/issues-similarity-analysis@v1 + with: + filter-threshold: 0.5 + comment-title: '### Probable Similar Topics' + title-excludes: 'Publish' + comment-body: '${index}. ${similarity} #${number}' + show-footer: false + show-mentioned: true + since-days: 365 \ No newline at end of file From 31670953b0ee0e253afa1f89494a72a999e36920 Mon Sep 17 00:00:00 2001 From: Masterain Date: Tue, 30 Jan 2024 19:00:42 -0800 Subject: [PATCH 7/8] Update issue_similarity.yml --- .github/workflows/issue_similarity.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue_similarity.yml b/.github/workflows/issue_similarity.yml index a9af99a8..c484a98c 100644 --- a/.github/workflows/issue_similarity.yml +++ b/.github/workflows/issue_similarity.yml @@ -13,8 +13,8 @@ jobs: with: filter-threshold: 0.5 comment-title: '### Probable Similar Topics' - title-excludes: 'Publish' + title-excludes: '[Publish]:,[Bug]:,[Feat]:,[Network]:,[ENG]' comment-body: '${index}. ${similarity} #${number}' show-footer: false show-mentioned: true - since-days: 365 \ No newline at end of file + since-days: 365 From 72395fdb895cce36f67d47070400c0a4f2b18226 Mon Sep 17 00:00:00 2001 From: qhy040404 <45379733+qhy040404@users.noreply.github.com> Date: Sun, 4 Feb 2024 10:58:23 +0800 Subject: [PATCH 8/8] say goodbye to azp --- azure-pipelines.yml | 119 -------------------------------------------- build.cake | 26 ++-------- 2 files changed, 3 insertions(+), 142 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ca0b5b85..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,119 +0,0 @@ -# CI process script for Snap.Hutao -# Usage: -# 1. Append the script in Pipelines -# 2. Upload the pfx and cer certificates to Pipelines Library secrets -# 3. Permit the pfx usage -# 4. Add a `pw` variable in the script variables, which is pfx password -# 5. Connect the GitHub in project settings -# 6. Run - -trigger: none -pr: none -# trigger: -# branches: -# include: -# - main -# - develop -# paths: -# exclude: -# - README.md -# - azure-pipelines.yml -# - .github/ISSUE_TEMPLATE/*.yml -# - .github/workflows/*.yml -# - src/Snap.Hutao/Snap.Hutao/Resource/Localization/*.resx -# pr: -# branches: -# include: -# - main -# paths: -# exclude: -# - README.md -# - azure-pipelines.yml -# - .github/ISSUE_TEMPLATE/*.yml -# - .github/workflows/*.yml -# - src/Snap.Hutao/Snap.Hutao/Resource/Localization/*.resx - - -pool: - name: Default - demands: agent.name -equals Hutao-Server - -variables: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - solution: '$(Build.SourcesDirectory)/src/Snap.Hutao/Snap.Hutao.sln' - project: $(Build.SourcesDirectory)/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj' - buildPlatform: 'x64' - buildConfiguration: 'Release' - - -steps: -- task: UseDotNet@2 - displayName: Install dotNet - inputs: - packageType: 'sdk' - version: '8.x' - includePreviewVersions: true - -- task: CmdLine@2 - displayName: dotnet cake - inputs: - script: dotnet tool restore && dotnet cake - -- task: MsixSigning@1 - name: signMsix - displayName: Sign MSIX package - inputs: - package: '$(Build.ArtifactStagingDirectory)/Snap.Hutao.Alpha-$(version).msix' - certificate: 'DGP_Studio_CI.pfx' - passwordVariable: 'pw' - condition: succeeded() - -- task: DownloadSecureFile@1 - name: cerFile - displayName: Download Root CA - inputs: - secureFile: 'Snap.Hutao.CI.cer' - -- task: PublishPipelineArtifact@1 - inputs: - targetPath: '$(Build.ArtifactStagingDirectory)' - artifact: 'Snap.Hutao.Alpha-$(version).msix' - publishLocation: 'pipeline' - -#- task: GitHubRelease@1 -# inputs: -# gitHubConnection: 'github.com_Masterain' -# repositoryName: 'DGP-Automation/Hutao-Auto-Release' -# action: 'create' -# target: '$(Build.SourceVersion)' -# tagSource: 'userSpecifiedTag' -# tag: '$(version)' -# title: '$(version)' -# releaseNotesSource: 'inline' -# releaseNotesInline: | -# ## 普通用户请勿下载 -# 该版本是由 CI 程序自动打包生成的 `Alpha` 测试版本,**仅供开发者测试使用** -# -# 普通用户请[点击这里](https://github.com/DGP-Studio/Snap.Hutao/releases/latest/)下载最新的稳定版本 -# -# assets: | -# $(Build.ArtifactStagingDirectory)/* -# $(cerFile.secureFilePath) -# isPreRelease: true -# changeLogCompareToRelease: 'lastFullRelease' -# changeLogType: 'commitBased' - - -- task: rclone@1 - displayName: Upload CI via Rclone - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) - inputs: - arguments: 'copy $(Build.ArtifactStagingDirectory)/Snap.Hutao.Alpha-$(version).msix downloadDGPCN:/releases/Alpha/' - configPath: 'C:\agent\_work\_tasks\rclone.conf' - -- task: rclone@1 - displayName: Upload PR CI via Rclone - condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest')) - inputs: - arguments: 'copy $(Build.ArtifactStagingDirectory)/Snap.Hutao.Alpha-$(version).msix downloadDGPCN:/releases/PR/' - configPath: 'C:\agent\_work\_tasks\rclone.conf' diff --git a/build.cake b/build.cake index 2d174f35..d99f0191 100644 --- a/build.cake +++ b/build.cake @@ -28,27 +28,7 @@ string manifest get => System.IO.Path.Combine(repoDir, "src", "Snap.Hutao", "Snap.Hutao", "Package.appxmanifest"); } -if (AzurePipelines.IsRunningOnAzurePipelines) -{ - repoDir = AzurePipelines.Environment.Build.SourcesDirectory.FullPath; - outputPath = AzurePipelines.Environment.Build.ArtifactStagingDirectory.FullPath; - - var versionAuth = HasEnvironmentVariable("VERSION_API_TOKEN") ? EnvironmentVariable("VERSION_API_TOKEN") : throw new Exception("Cannot find VERSION_API_TOKEN"); - version = HttpGet( - "https://internal.snapgenshin.cn/BuildIntergration/RequestNewVersion", - new HttpSettings - { - Headers = new Dictionary - { - { "Authorization", versionAuth } - } - } - ); - Information($"Version: {version}"); - - AzurePipelines.Commands.SetVariable("version", version); -} -else if (GitHubActions.IsRunningOnGitHubActions) +if (GitHubActions.IsRunningOnGitHubActions) { repoDir = GitHubActions.Environment.Workflow.Workspace.FullPath; outputPath = System.IO.Path.Combine(repoDir, "src", "output"); @@ -106,7 +86,7 @@ Task("Generate AppxManifest") var content = System.IO.File.ReadAllText(manifest); - if (AzurePipelines.IsRunningOnAzurePipelines || GitHubActions.IsRunningOnGitHubActions) + if (GitHubActions.IsRunningOnGitHubActions) { Information("Using CI configuraion"); content = content @@ -175,7 +155,7 @@ Task("Build MSIX") .Does(() => { var arguments = "arguments"; - if (AzurePipelines.IsRunningOnAzurePipelines || GitHubActions.IsRunningOnGitHubActions) + if (GitHubActions.IsRunningOnGitHubActions) { arguments = "pack /d " + binPath + " /p " + System.IO.Path.Combine(outputPath, $"Snap.Hutao.Alpha-{version}.msix"); }