-
Notifications
You must be signed in to change notification settings - Fork 69
39 lines (32 loc) · 1.04 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 dict_for_fcitx5.txt from YAML
id: dict_for_fcitx5
run: |
python others/program/release/generate_dict_for_fcitx5.py # 运行你的 Python 脚本
- name: Get upload URL
id: upload-url
uses: actions/github-script@v6
with:
script: |
return context.payload.release.upload_url.replace('{?name,label}', '');
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
asset_path: ./dict_for_fcitx5.txt
asset_name: dict_for_fcitx5.txt
asset_content_type: text/plain
upload_url: ${{ steps.upload-url.outputs.result }}
token: ${{ secrets.TOKEN }} # 使用自动提供的 GitHub Token