mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-15 03:53:16 +08:00
🔨 调整构建
This commit is contained in:
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@@ -73,6 +73,8 @@ jobs:
|
||||
version: 10.23.0
|
||||
- name: Install frontend dependencies
|
||||
run: pnpm install
|
||||
- name: Setup sentry-cli
|
||||
run: npm install -g @sentry/cli
|
||||
|
||||
- name: Build app
|
||||
uses: tauri-apps/tauri-action@dev
|
||||
@@ -93,3 +95,14 @@ jobs:
|
||||
</a>
|
||||
releaseDraft: true
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Sentry Pdb
|
||||
if: matrix.settings.target == windows
|
||||
run: |
|
||||
echo "Uploading release: $SENTRY_RELEASE"
|
||||
sentry-cli releases new "$SENTRY_RELEASE"
|
||||
sentry-cli upload-dif src-tauri/target/release/TeyvatGuide.pdb
|
||||
sentry-cli releases finalize "$SENTRY_RELEASE"
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_RELEASE: ${{ env.SENTRY_RELEASE }}
|
||||
|
||||
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@@ -183,6 +183,8 @@ jobs:
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 10.23.0
|
||||
- name: Setup sentry-cli
|
||||
run: npm install -g @sentry/cli
|
||||
- name: Install frontend dependencies
|
||||
run: pnpm install
|
||||
|
||||
@@ -218,3 +220,13 @@ jobs:
|
||||
with:
|
||||
name: release-win
|
||||
path: TeyvatGuide_${{ env.COMMIT_HASH }}_win-release.msi
|
||||
- name: Upload Sentry Pdb
|
||||
if: matrix.settings.target == windows
|
||||
run: |
|
||||
echo "Uploading release: $SENTRY_RELEASE"
|
||||
sentry-cli releases new "$SENTRY_RELEASE"
|
||||
sentry-cli upload-dif src-tauri/target/release/TeyvatGuide.pdb
|
||||
sentry-cli releases finalize "$SENTRY_RELEASE"
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_RELEASE: ${{ env.SENTRY_RELEASE }}
|
||||
|
||||
@@ -46,6 +46,12 @@ execSync("pnpm tauri build", { stdio: "inherit" });
|
||||
|
||||
// 上传pdb
|
||||
if (isGitHubActions) {
|
||||
if (process.env.GITHUB_ENV) {
|
||||
writeFileSync(process.env.GITHUB_ENV, `SENTRY_RELEASE=${release}\n`, { flag: "a" });
|
||||
console.log("📦 SENTRY_RELEASE exported to GitHub Actions env.");
|
||||
} else {
|
||||
console.warn("⚠️ Not running inside GitHub Actions. Skipping env export.");
|
||||
}
|
||||
process.exit();
|
||||
}
|
||||
const pdbGlob = "src-tauri/target/release/TeyvatGuide.pdb";
|
||||
|
||||
Reference in New Issue
Block a user