diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7c93b89 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +version: 2 + +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + actions: + patterns: + - "*" + + - package-ecosystem: gitsubmodule + directory: / + schedule: + interval: weekly + groups: + submodules: + patterns: + - "*" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..fdcfdd1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,51 @@ +on: + workflow_dispatch: + pull_request: + schedule: + - cron: 0 8 1 */3 * + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + name: Build Rime Clover Pinyin + permissions: + contents: write + steps: + - name: Set variables + run: | + echo "RELEASE_NAME=Released on $(date +%Y%m%d)" >> $GITHUB_ENV + echo "TAG_NAME=$(date +%Y%m%d)" >> $GITHUB_ENV + shell: bash + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: true + + - name: Prepare Environment + id: prepare + run: | + sudo apt-get update && sudo apt-get install -y git build-essential python3 wget unzip opencc librime-bin curl && wget https://raw.githubusercontent.com/rime/plum/master/rime-install && bash rime-install prelude && python3 -m pip install -U -r requirements.txt + + - name: Build + run: | + git submodule update --recursive --remote --rebase && bash ./build.sh && bash ./pack.sh `date +%y%m` + + - uses: actions/upload-artifact@v4 + with: + name: Packages for release + path: data/clover.schema-*.zip + + - name: Release + uses: softprops/action-gh-release@v2 + with: + name: ${{ env.RELEASE_NAME }} + tag_name: ${{ env.TAG_NAME }} + prerelease: true + files: | + data/clover.schema-*.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5236597 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +opencc>=1.1.6 +jieba>=0.42.1 +pypinyin>=0.49.0 +requests>=2.31.0 diff --git a/rime-emoji b/rime-emoji index ca91e50..be7d308 160000 --- a/rime-emoji +++ b/rime-emoji @@ -1 +1 @@ -Subproject commit ca91e504da44405b4d4c6ef35725af397bf08f0f +Subproject commit be7d308e42c4c4485229de37ec0afb7bafbfafc0 diff --git a/rime-essay b/rime-essay index 8882482..e0519d0 160000 --- a/rime-essay +++ b/rime-essay @@ -1 +1 @@ -Subproject commit 8882482d07f38b5713ea3f49cb593eed94e671dd +Subproject commit e0519d0579722a0871efb68189272cba61a7350b diff --git a/rime-pinyin-simp b/rime-pinyin-simp index b0e84cd..52b9c75 160000 --- a/rime-pinyin-simp +++ b/rime-pinyin-simp @@ -1 +1 @@ -Subproject commit b0e84cda02c613ebdedc127a26131b3800f45a8e +Subproject commit 52b9c75f085479799553f2499c4f4c611d618cdf