Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用Dependabot更新submodule,使用Actions构建并发布 #151

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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:
- "*"
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
opencc>=1.1.6
jieba>=0.42.1
pypinyin>=0.49.0
requests>=2.31.0
2 changes: 1 addition & 1 deletion rime-emoji
2 changes: 1 addition & 1 deletion rime-essay
Submodule rime-essay updated 1 files
+158 −13 essay.txt
2 changes: 1 addition & 1 deletion rime-pinyin-simp