Skip to content

Commit 1d7faf5

Browse files
Merge pull request #2 from KazumaProject/feature/github-actions
create release ci
2 parents bc84ae1 + 05e030d commit 1d7faf5

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release dictionaries on tag
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
- "*"
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build-and-release:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Install build dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y --no-install-recommends \
24+
cmake g++ zlib1g-dev libcurl4-openssl-dev ca-certificates
25+
26+
- name: Configure (CMake)
27+
run: |
28+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_MOZC_FETCH=ON
29+
30+
- name: Build
31+
run: |
32+
cmake --build build --config Release -j 2
33+
34+
- name: Download Mozc dictionaries
35+
run: |
36+
./build/mozc_dic_fetch
37+
38+
- name: Build connection_single_column.bin
39+
run: |
40+
mkdir -p dist
41+
./build/dictionary_builder \
42+
--in src/dictionary_builder/mozc_fetch \
43+
--out dist/mozc_reading.louds \
44+
--conn-out dist/connection_single_column.bin
45+
46+
- name: Build yomi_termid.louds / tango.louds / token_array.bin
47+
run: |
48+
./build/tries_token_builder \
49+
--in_dir src/dictionary_builder/mozc_fetch \
50+
--out_dir dist
51+
52+
- name: Verify artifacts
53+
run: |
54+
ls -lah dist
55+
test -f dist/yomi_termid.louds
56+
test -f dist/tango.louds
57+
test -f dist/token_array.bin
58+
test -f dist/connection_single_column.bin
59+
60+
- name: Create GitHub Release and upload artifacts
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
name: ${{ github.ref_name }}
64+
tag_name: ${{ github.ref_name }}
65+
files: |
66+
dist/yomi_termid.louds
67+
dist/tango.louds
68+
dist/token_array.bin
69+
dist/connection_single_column.bin

0 commit comments

Comments
 (0)