mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
81 lines
2.5 KiB
YAML
81 lines
2.5 KiB
YAML
name: Snap Hutao Alpha
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
- 'feat/*'
|
|
paths-ignore:
|
|
- '.gitattributes'
|
|
- '.github/**'
|
|
- '.gitignore'
|
|
- '.gitmodules'
|
|
- '**.md'
|
|
- 'LICENSE'
|
|
- '**.yml'
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
paths-ignore:
|
|
- '.gitattributes'
|
|
- '.github/**'
|
|
- '.gitignore'
|
|
- '.gitmodules'
|
|
- '**.md'
|
|
- 'LICENSE'
|
|
- '**.yml'
|
|
- '**.resx'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 8.0
|
|
|
|
- name: Cake
|
|
id: cake
|
|
shell: pwsh
|
|
run: dotnet tool restore && dotnet cake
|
|
env:
|
|
VERSION_API_TOKEN: ${{ secrets.VERSION_API_TOKEN }}
|
|
|
|
- name: Sign Msix
|
|
if: success() && github.event_name != 'pull_request'
|
|
shell: pwsh
|
|
run: |
|
|
[System.Convert]::FromBase64String("${{ secrets.CERTIFICATE }}") | Set-Content -AsByteStream temp.pfx
|
|
signtool.exe sign /debug /v /a /fd SHA256 /f temp.pfx /p ${{ secrets.PW }} ${{ github.workspace }}\src\output\Snap.Hutao.Alpha-${{ steps.cake.outputs.version }}.msix
|
|
|
|
- name: Upload signed msix
|
|
if: success() && github.event_name != 'pull_request'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Snap.Hutao.Alpha-${{ steps.cake.outputs.version }}
|
|
path: ${{ github.workspace }}/src/output/Snap.Hutao.Alpha-${{ steps.cake.outputs.version }}.msix
|
|
|
|
- name: Add summary
|
|
if: success() && github.event_name != 'pull_request'
|
|
shell: pwsh
|
|
run: |
|
|
$summary = "
|
|
> [!WARNING]
|
|
> 该版本是由 CI 程序自动打包生成的 `Alpha` 测试版本,**仅供开发者测试使用**
|
|
|
|
> [!TIP]
|
|
> 普通用户请[点击这里](https://github.com/DGP-Studio/Snap.Hutao/releases/latest/)下载最新的稳定版本
|
|
|
|
> [!IMPORTANT]
|
|
> 请注意,从 Snap Hutao Alpha 2023.12.21.3 开始,我们将使用全新的 CI 证书,原有的 Snap.Hutao.CI.cer 将在几天后过期停止使用。
|
|
>
|
|
> 请安装 [DGP_Studio_CA.crt](https://github.com/DGP-Automation/Hutao-Auto-Release/releases/download/certificate-ca/DGP_Studio_CA.crt) 到 `受信任的根证书颁发机构` 以安装测试版安装包
|
|
"
|
|
|
|
echo $summary >> $Env:GITHUB_STEP_SUMMARY
|