revert: remove external dictionary sources #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build CLI Swift | ||
|
Check failure on line 1 in .github/workflows/build-cli-swift.yml
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - 'tools/gins-rime-cli/**' | ||
| - 'scheme/**' | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | ||
| jobs: | ||
| build: | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Build Swift binary | ||
| working-directory: tools/gins-rime-cli | ||
| run: | | ||
| swift build -c release | ||
| cp .build/release/GinsRime /tmp/gins-rime-native | ||
| chmod +x /tmp/gins-rime-native | ||
| - name: Upload to R2 | ||
| env: | ||
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | ||
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | ||
| run: | | ||
| npx wrangler r2 object put gins-rime/cli/gins-rime-native \ | ||
| --file /tmp/gins-rime-native \ | ||
| --content-type "application/octet-stream" | ||
| - name: Sync Wanxiang Grammar Model | ||
| env: | ||
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | ||
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | ||
| - name: Sync Wanxiang Grammar Model | ||
| env: | ||
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | ||
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | ||
| run: | | ||
| curl -L -o /tmp/wanxiang-lts-zh-hans.gram "https://github.com/amzxyz/RIME-LMDG/releases/download/LTS/wanxiang-lts-zh-hans.gram" | ||
| npx wrangler r2 object put gins-rime/models/wanxiang-lts-zh-hans.gram --file /tmp/wanxiang-lts-zh-hans.gram | ||
| curl -X POST "https://rime.ichimarugin728.dev/api/metadata-update" -H "Authorization: Bearer ${{ secrets.CF_API_TOKEN }}" -H "Content-Type: application/json" -d "{\"key\": \"model\", \"val\": {\"date\": \"$(date +'%Y%m%d')\", \"url\": \"/models/wanxiang-lts-zh-hans.gram\"}}" | ||