-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
73 lines (63 loc) · 2.03 KB
/
appveyor.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
version: 'translation.{build}'
branches:
only:
- main
skip_tags: true
# Build worker image (VM template)
image: Ubuntu2004
# scripts that are called at very beginning, before repo cloning
init:
- node -v
- git config --global core.autocrlf input
# clone directory
clone_folder: /home/appveyor/projects/translation-maker/
# fetch repository as zip archive
shallow_clone: true # default is "false"
# set clone depth
clone_depth: 1
install:
- ls ${APPVEYOR_BUILD_FOLDER}
- cd ${APPVEYOR_BUILD_FOLDER}
- nvm use 18
- npm i -g pnpm
- pnpm install --frozen-lockfile && pnpm run gen
- cd ${APPVEYOR_BUILD_FOLDER}/resource
- md5sum "excel.xlsx" > ${APPVEYOR_BUILD_FOLDER}/output/list.md5
- appveyor PushArtifact ${APPVEYOR_BUILD_FOLDER}/output/translations.zip
- appveyor PushArtifact ${APPVEYOR_BUILD_FOLDER}/output/subgroups.zip
- appveyor PushArtifact ${APPVEYOR_BUILD_FOLDER}/output/list.md5
build: false
before_deploy:
- cd ${APPVEYOR_BUILD_FOLDER}/resource/
- wget -c https://github.com/kongying-tavern/translation-maker/releases/latest/download/list.md5
# use exit 1 to make sure email notifications only on_success.
- if (md5sum --status -c list.md5); then exit 1; else echo newFile; fi
deploy:
- provider: GitHub
description: 'auto build translation with md5'
auth_token:
secure: qVIe1mUQFH0xGmWgTAhwYp5fI/4iueAgxGOI9VkszlSaJ5Jd7LclfKEC688Rk1b1
draft: false
tag: translation-${APPVEYOR_BUILD_ID}
on:
APPVEYOR_REPO_TAG: false
- provider: FTP
protocol: sftp
host:
secure: bIO7k3lus79a9p0FIaKg7g==
username:
secure: DJzHnaYnZXJo1xjVB5N1Rg==
password:
secure: UOKhBppthS6fdDd8aVWSkg==
folder: ../www/YuanShen/HotUpdate/Language
application: /translations\.zip/
notifications:
- provider: Email
to:
subject: 'i18n translations build {{status}}'
message: "Translations files need to be updated."
on_build_success: true
on_build_failure: false
on_build_status_changed: false