Skip to content

revert: remove external dictionary sources #5

revert: remove external dictionary sources

revert: remove external dictionary sources #5

name: Build CLI Swift

Check failure on line 1 in .github/workflows/build-cli-swift.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-cli-swift.yml

Invalid workflow file

(Line: 39, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory
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\"}}"