Files
HuLa/docs/release-config.md
Dawn b7ec9b21d4 feat(i18n): add i18n for remaining pages and fix content disorder
fix unable to automatically download AI-generated content
add github action to enter the corresponding key into the generation environment
2025-11-29 07:17:27 +08:00

937 B
Raw Blame History

发布流程中的生产配置注入说明

在 GitHub Actions 的 release 流程(.github/workflows/release.yml)里,打包前会自动生成 src-tauri/configuration/production.yaml,将密钥写入其中。需要在仓库的 Settings → Secrets and variables → Actions 中配置以下 Secrets

  • YOUDAO_APP_KEY
  • YOUDAO_APP_SECRET
  • TENCENT_API_KEY
  • TENCENT_SECRET_ID
  • TENCENT_MAP_KEY

工作流会在 publish-tauri 任务中执行:

mkdir -p src-tauri/configuration
cat > src-tauri/configuration/production.yaml <<'EOF'
youdao:
  app_key: "${YOUDAO_APP_KEY}"
  app_secret: "${YOUDAO_APP_SECRET}"
tencent:
  api_key: "${TENCENT_API_KEY}"
  secret_id: "${TENCENT_SECRET_ID}"
  map_key: "${TENCENT_MAP_KEY}"
EOF

配置完成后,推送符合规则的标签(如 v1.2.3)触发发布时,以上内容会被写入生产配置文件参与打包,无需将密钥提交到仓库。***