-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (42 loc) · 1.08 KB
/
build.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
name: Build Release
on:
push:
tags:
- "*"
jobs:
build-ankiaddon:
runs-on: ubuntu-latest
steps:
- name: Set env
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v2
- name: Create dist folder
shell: bash
run: |
mkdir dist
- name: Set version
shell: bash
run: |
echo "VERSION_STRING = '${{ env.RELEASE_VERSION }}'" > addon/version.py
- name: Download KanjiVG
shell: bash
run: |
bash tools/kanjivg_download.sh
- name: Modify KanjiVG
shell: bash
run: |
python3 tools/kanjivg_cleanup.py
- name: Zip
shell: bash
run: |
cd addon
zip -r ../dist/MigakuKanjiGOD.ankiaddon . -x user_files/\* meta.json
cd ..
- name: Upload artifacts
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}