Skip to content

Commit 67637ee

Browse files
committed
chore: update appveyor yaml
1 parent ea791cb commit 67637ee

File tree

1 file changed

+52
-57
lines changed

1 file changed

+52
-57
lines changed

appveyor.yml

+52-57
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
version: 'translation.{build}'
22

3+
branches:
4+
only:
5+
- main
6+
37
skip_tags: true
48

59
# Build worker image (VM template)
610
image: Ubuntu2004
711

812
# scripts that are called at very beginning, before repo cloning
913
init:
10-
- node -v
11-
- git config --global core.autocrlf input
14+
- node -v
15+
- git config --global core.autocrlf input
1216

1317
# clone directory
1418
clone_folder: /home/appveyor/projects/translation-maker/
@@ -17,62 +21,53 @@ clone_folder: /home/appveyor/projects/translation-maker/
1721
shallow_clone: true # default is "false"
1822

1923
# set clone depth
20-
clone_depth: 1 # clone entire repository history if not defined
21-
22-
# stack: node 18
24+
clone_depth: 1
2325

24-
environment:
25-
refresh_token:
26-
secure: hSIWQHE0jBxYTcoitrlR/Fv9Sff4X8DAw6SASshdLgyujYtuv89wZtppyG8n/FKK
27-
# https://www.appveyor.com/docs/getting-started-with-appveyor-for-linux/#premature-termination-of-the-build-process
28-
# exit 0 in Bash immediately terminates the build with “green” status; without running on_success and on_finish commands.
29-
# exit <non-zero> in Bash immediately terminates the build with “red” status without running on_failure and on_finish commands.
30-
# appveyor exit in Bash “gracefully” terminates build with “green” status by running on_success and on_finish commands.
31-
# false command in Bash “gracefully” terminates the build with “red” status by running on_failure and on_finish commands.
3226
install:
33-
- ls ${APPVEYOR_BUILD_FOLDER}
34-
- cd ${APPVEYOR_BUILD_FOLDER}
35-
# - appveyor DownloadFile https://media.cooluc.com/source/aliyunDrive-cli/aliyundrive-cli_linux_amd64 -FileName pan
36-
- nvm use 18
37-
- npm i -g pnpm
38-
- pnpm install --frozen-lockfile && pnpm run gen
39-
# - filesize=$(wc -c ${APPVEYOR_BUILD_FOLDER}/output/translations.zip | awk '{print $1}')
40-
# - filesha1=$(sha1sum ${APPVEYOR_BUILD_FOLDER}/output/translations.zip | awk '{print $1}')
41-
# - ./pan -t ${refresh_token} upload -f "aliyunpan://translations.zip|${filesha1}|${filesize}|release"
42-
# - cd ${APPVEYOR_BUILD_FOLDER}/resource/
43-
# - md5sum "excel.xlsx" > ${APPVEYOR_BUILD_FOLDER}/output/list.md5
44-
- appveyor PushArtifact ${APPVEYOR_BUILD_FOLDER}/output/translations.zip
45-
# - appveyor PushArtifact ${APPVEYOR_BUILD_FOLDER}/output/list.md5
46-
- appveyor PushArtifact ${APPVEYOR_BUILD_FOLDER}/output/subgroups.zip
47-
build: off
27+
- ls ${APPVEYOR_BUILD_FOLDER}
28+
- cd ${APPVEYOR_BUILD_FOLDER}
29+
- nvm use 18
30+
- npm i -g pnpm
31+
- pnpm install --frozen-lockfile && pnpm run gen
32+
- cd ${APPVEYOR_BUILD_FOLDER}/resource
33+
- md5sum "excel.xlsx" > ${APPVEYOR_BUILD_FOLDER}/output/list.md5
34+
- appveyor PushArtifact ${APPVEYOR_BUILD_FOLDER}/output/translations.zip
35+
- appveyor PushArtifact ${APPVEYOR_BUILD_FOLDER}/output/subgroups.zip
36+
- appveyor PushArtifact ${APPVEYOR_BUILD_FOLDER}/output/list.md5
37+
build: false
4838

49-
# for:
50-
# -
51-
# branches:
52-
# only:
53-
# - main
54-
# before_deploy:
55-
# - cd ${APPVEYOR_BUILD_FOLDER}/resource/
56-
# - wget -c https://github.com/peaceshi/translation-maker/releases/latest/download/list.md5
57-
# # use exit 1 to make sure email notifications only on_success.
58-
# - if (md5sum --status -c list.md5); then exit 1; else echo newFile; fi
59-
# deploy:
60-
# - provider: GitHub
61-
# description: 'auto build translation with md5'
62-
# auth_token:
63-
# secure: d0YiYq36VrCUet5Y/zYZ+41XUKSSOVOcGtwIW6EXQD+NkDNeErIA3EG5s7oGlLJM
64-
# draft: false
65-
# tag: translation-${APPVEYOR_BUILD_ID}
66-
# on:
67-
# APPVEYOR_REPO_TAG: false
39+
before_deploy:
40+
- cd ${APPVEYOR_BUILD_FOLDER}/resource/
41+
- wget -c https://github.com/kongying-tavern/translation-maker/releases/latest/download/list.md5
42+
# use exit 1 to make sure email notifications only on_success.
43+
- if (md5sum --status -c list.md5); then exit 1; else echo newFile; fi
44+
deploy:
45+
- provider: GitHub
46+
description: 'auto build translation with md5'
47+
auth_token:
48+
secure: qVIe1mUQFH0xGmWgTAhwYp5fI/4iueAgxGOI9VkszlSaJ5Jd7LclfKEC688Rk1b1
49+
draft: false
50+
tag: translation-${APPVEYOR_BUILD_ID}
51+
on:
52+
APPVEYOR_REPO_TAG: false
53+
- provider: FTP
54+
protocol: sftp
55+
host:
56+
secure: bIO7k3lus79a9p0FIaKg7g==
57+
username:
58+
secure: DJzHnaYnZXJo1xjVB5N1Rg==
59+
password:
60+
secure: UOKhBppthS6fdDd8aVWSkg==
61+
folder: /www/YuanShen/HotUpdate/Language
62+
artifact: /translations\.zip/
6863

69-
# notifications:
70-
# - provider: Email
71-
# to:
72-
# - peaceshi@outlook.com
73-
74-
# subject: 'i18n translations build {{status}}'
75-
# message: "Translations files need to be updated."
76-
# on_build_success: true
77-
# on_build_failure: false
78-
# on_build_status_changed: false
64+
notifications:
65+
- provider: Email
66+
to:
67+
- deeno@qq.com
68+
69+
subject: 'i18n translations build {{status}}'
70+
message: "Translations files need to be updated."
71+
on_build_success: true
72+
on_build_failure: false
73+
on_build_status_changed: false

0 commit comments

Comments
 (0)