Skip to content

fix: support google-style api key headers #13

fix: support google-style api key headers

fix: support google-style api key headers #13

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: oven-sh/setup-bun@v2
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- run: brew install pnpm
- run: pnpm install
- name: Build ai-engine for aarch64
run: |
cd packages/ai-engine
bun install
bun build src/cli.ts --compile --target=bun-darwin-arm64 --outfile ../../src-tauri/bin/ai-engine-aarch64-apple-darwin
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --target aarch64-apple-darwin
- uses: actions/upload-artifact@v4
with:
name: macos-arm64
path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: oven-sh/setup-bun@v2
- uses: dtolnay/rust-toolchain@stable
- run: npm install -g pnpm
- run: pnpm install
- name: Build ai-engine for Windows
run: |
cd packages/ai-engine
bun install
bun build src/cli.ts --compile --target=bun-windows-x64 --outfile ../../src-tauri/bin/ai-engine-x86_64-pc-windows-msvc.exe
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: windows-x64
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
release:
needs: [build-macos-arm64, build-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List artifacts
run: find artifacts -type f
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: Creator Studio ${{ github.ref_name }}
body: |
## Creator Studio ${{ github.ref_name }}
AI 驱动的小说写作助手
### 下载
- **macOS (Apple Silicon)**: CreatorAI_*_aarch64.dmg
- **Windows**: CreatorAI_*_x64-setup.exe 或 .msi
### 更新内容
- 首次发布
files: artifacts/**/*
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}