-
-
Notifications
You must be signed in to change notification settings - Fork 22
87 lines (79 loc) · 2.97 KB
/
main.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
on: [push]
jobs:
simplified-moran:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cd tools && python3 -m pip install pdm --break-system-packages && pdm install
- run: sudo apt install opencc p7zip-full
- run: pdm use -f tools/.venv && $(pdm venv activate) && ./make_simp_dist.sh github
- uses: actions/upload-artifact@v4
with:
name: "Simp-FullPack"
path: dist/**
- uses: actions/upload-artifact@v4
with:
name: "Simp-DictsOnly"
path: |
dist/moran.base.dict.yaml
dist/moran.tencent.dict.yaml
dist/moran.moe.dict.yaml
dist/moran.computer.dict.yaml
dist/moran.hanyu.dict.yaml
dist/moran.words.dict.yaml
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
traditional-moran:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
git archive HEAD -o archive.tar
mkdir -p dist
tar xf archive.tar -C dist
rm -rf dist/tools dist/.git dist/.github dist/make_simp_dist.sh
- uses: actions/upload-artifact@v4
with:
name: "Trad-FullPack"
path: dist/**
- uses: actions/upload-artifact@v4
with:
name: "Trad-DictsOnly"
path: |
dist/moran.base.dict.yaml
dist/moran.tencent.dict.yaml
dist/moran.moe.dict.yaml
dist/moran.computer.dict.yaml
dist/moran.hanyu.dict.yaml
dist/moran.words.dict.yaml
# upload-to-hamster:
# needs: [simplified-moran, traditional-moran]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Download Simplified Moran Artifact
# uses: actions/download-artifact@v3
# with:
# name: "简体完整配置包"
# path: simplified_artifact
# - name: Archive Simplified Moran Artifact
# run: ( cd simplified_artifact/ && zip -r ../simplified_artifact.zip . )
# - name: Download Traditional Moran Artifact
# uses: actions/download-artifact@v3
# with:
# name: "繁體完整配置包"
# path: traditional_artifact
# - name: Archive Traditional Moran Artifact
# run: ( cd traditional_artifact/ && zip -r ../traditional_artifact.zip . )
# - name: Upload artifacts to Hamster
# env:
# HTTP_AUTHORIZATION: ${{ secrets.HTTP_AUTHORIZATION }}
# HTTP_HAMSTER_USERID: ${{ secrets.HTTP_HAMSTER_USERID }}
# run: |
# pip3 install -r tools/requirements.txt
# # 魔然【简】
# python3 tools/hamsterUpload.py 0AD56D4E-010E-4961-B6AB-4FFDEA4AA5BF simplified_artifact.zip --variant 简体
# # 魔然【繁】
# python3 tools/hamsterUpload.py D5C8710C-DF74-4004-B5C6-742344BCDC69 traditional_artifact.zip --variant 繁體