From 44ed5cb5380bb6c26aefa850c0bde3df855be2b0 Mon Sep 17 00:00:00 2001 From: gaboolic <23441099@qq.com> Date: Sun, 11 Aug 2024 09:09:49 +0800 Subject: [PATCH] =?UTF-8?q?release=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..99eb184 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: release + +on: + release: + types: [published] + +jobs: + generate-txt: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' # 你可以根据需要选择 Python 版本 + + + - name: Generate rime zip + run: | + python program/release/generate_rime_all_schema_zip.py # 运行你的 Python 脚本 + + + - name: Upload rime-schemas + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.TOKEN }} + with: + asset_path: rime-sentence-schemas.zip + asset_name: rime-sentence-schemas.zip + asset_content_type: application/zip + upload_url: ${{ github.event.release.upload_url }}