🧑‍💻 调整构建

This commit is contained in:
BTMuli
2025-11-22 13:40:57 +08:00
parent 256b529b16
commit 6af43bf957
3 changed files with 30 additions and 69 deletions

View File

@@ -1,42 +0,0 @@
name: 原神游戏资源更新(仅供开发者使用)
description: 版本前瞻后的例行资源更新
title: "[Update] "
labels:
- 资源
body:
- type: checkboxes
attributes:
label: Issue Check
options:
- label: 个人明确了解该模板仅供开发者使用
required: true
- type: input
id: version
attributes:
label: 游戏版本
description: 请填写游戏版本
placeholder: 如 4.6
- type: checkboxes
id: resources
attributes:
label: 包括的资源
options:
- label: 角色&名片,有新角色时选择
required: false
- label: 武器,有新武器时选择
required: false
- label: 成就,有新成就时选择
required: false
- label: 材料,有新材料时选择
required: false
- type: textarea
id: detail
attributes:
label: 详情
description: 对上述内容进行详细说明
- type: textarea
id: additional
attributes:
label: 其他信息
description: 请填写其他信息
placeholder: 请填写其他信息

View File

@@ -66,7 +66,7 @@ jobs:
- name: setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10.16.1
version: 10.23.0
- name: Install frontend dependencies
run: pnpm install

View File

@@ -68,58 +68,61 @@ jobs:
- name: setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10.16.1
version: 10.23.0
- name: Install frontend dependencies
run: pnpm install
# 获取commit hash后续用这个做文件命名
- name: Get Commit Hash
id: get_commit_hash
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# Build Debug
- name: Build debug app
uses: tauri-apps/tauri-action@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ${{ matrix.settings.args }} --debug
- name: Move Debug Intel
if: matrix.settings.target == 'macos-intel' && github.event.inputs.build-debug == 'true'
run: mv src-tauri/target/x86_64-apple-darwin/debug/bundle/dmg/*.dmg TeyvatGuide_${{ env.COMMIT_HASH }}_intel-debug.dmg
- name: Move Debug ARM
if: matrix.settings.target == 'macos-arm' && github.event.inputs.build-debug == 'true'
run: mv src-tauri/target/aarch64-apple-darwin/debug/bundle/dmg/*.dmg TeyvatGuide_${{ env.COMMIT_HASH }}_arm-debug.dmg
- name: Upload Debug Intel
if: matrix.settings.target == 'macos-intel' && github.event.inputs.build-debug == 'true'
uses: actions/upload-artifact@v4
with:
name: debug-macos-intel
path: TeyvatGuide_${{ env.COMMIT_HASH }}_intel-debug.dmg
- name: Upload Debug ARM
if: matrix.settings.target == 'macos-arm' && github.event.inputs.build-debug == 'true'
uses: actions/upload-artifact@v4
with:
name: debug-macos-arm
path: TeyvatGuide_${{ env.COMMIT_HASH }}_arm-debug.dmg
# Build Release
- name: Build app
uses: tauri-apps/tauri-action@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ${{ matrix.settings.args }}
# Build Debug
- name: Move Debug Intel
if: matrix.settings.target == 'macos-intel' && github.event.inputs.build-debug == 'true'
run: mv src-tauri/target/x86_64-apple-darwin/debug/bundle/dmg/*.dmg intel-debug.dmg
- name: Move Debug ARM
if: matrix.settings.target == 'macos-arm' && github.event.inputs.build-debug == 'true'
run: mv src-tauri/target/aarch64-apple-darwin/debug/bundle/dmg/*.dmg arm-debug.dmg
- name: Upload Debug Intel
if: matrix.settings.target == 'macos-intel' && github.event.inputs.build-debug == 'true'
uses: actions/upload-artifact@v4
with:
name: debug-macos-intel
path: intel-debug.dmg
- name: Upload Debug ARM
if: matrix.settings.target == 'macos-arm' && github.event.inputs.build-debug == 'true'
uses: actions/upload-artifact@v4
with:
name: debug-macos-arm
path: arm-debug.dmg
# Build Release
- name: Move Release Intel
if: matrix.settings.target == 'macos-intel' && github.event.inputs.build-release == 'true'
run: mv src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg intel-release.dmg
run: mv src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg TeyvatGuide_${{ env.COMMIT_HASH }}_intel-release.dmg
- name: Move Release ARM
if: matrix.settings.target == 'macos-arm' && github.event.inputs.build-release == 'true'
run: mv src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg arm-release.dmg
run: mv src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg TeyvatGuide_${{ env.COMMIT_HASH }}_arm-release.dmg
- name: Upload Release Intel
if: matrix.settings.target == 'macos-intel' && github.event.inputs.build-release
uses: actions/upload-artifact@v4
with:
name: release-macos-intel
path: intel-release.dmg
path: TeyvatGuide_${{ env.COMMIT_HASH }}_intel-release.dmg
- name: Upload Release ARM
if: matrix.settings.target == 'macos-arm' && github.event.inputs.build-release == 'true'
uses: actions/upload-artifact@v4
with:
name: release-macos-arm
path: arm-release.dmg
path: TeyvatGuide_${{ env.COMMIT_HASH }}_arm-release.dmg