forked from JustArchiNET/ASF-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
120 lines (88 loc) · 3.69 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: '{build}-{branch}'
pull_requests:
do_not_increment_build_number: true
skip_branch_with_pr: true
image: Visual Studio 2019
configuration: Release
clone_depth: 10
environment:
CROWDIN_API_KEY:
secure: oGuZaQo2z5/JkEYaKrD9Ing+TgwZ3qQVf+9Jdz73Fephy04z5rWPGCCtkjaMLTcY
CROWDIN_PROJECT_IDENTIFIER: archisteamfarm
install:
- pwsh: >-
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
git submodule update --init --recursive
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
build_script:
- pwsh: >-
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
npm ci
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
npm run-script build:ci
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
after_test:
- pwsh: >-
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
# By default use fastest compression
$compressionArgs = '-mx=1'
# Include extra logic for builds marked for release
if ($env:APPVEYOR_REPO_TAG -eq 'true') {
# If this build is going to be deployed further, prefer maximum compression
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq 'Visual Studio 2019') {
$compressionArgs = '-mx=9', '-mpass=15', '-mfb=258'
}
}
7z a -bd -tzip '-mm=Deflate' $compressionArgs 'out\ASF-ui.zip' "$env:APPVEYOR_BUILD_FOLDER\dist\*"
# TODO: Change me to Push-AppveyorArtifact once https://github.com/appveyor/ci/issues/2183 is fixed
appveyor PushArtifact 'out\ASF-ui.zip' -FileName 'ASF-ui.zip' -DeploymentName 'ASF-ui.zip'
if (!($env:APPVEYOR_PULL_REQUEST_NUMBER) -and ($env:APPVEYOR_REPO_BRANCH -eq 'master') -and ($env:APPVEYOR_REPO_TAG -eq 'false') -and (Test-Path 'crowdin.yml' -PathType Leaf) -and (Test-Path 'tools\ArchiCrowdin\crowdin_identity_example.yml' -PathType Leaf) -and (Test-Path 'tools\ArchiCrowdin\archi.ps1' -PathType Leaf)) {
(Get-Content 'tools\ArchiCrowdin\crowdin_identity_example.yml').Replace('CROWDIN_API_KEY', "$env:CROWDIN_API_KEY").Replace('CROWDIN_PROJECT_IDENTIFIER', "$env:CROWDIN_PROJECT_IDENTIFIER") | Set-Content 'tools\ArchiCrowdin\crowdin_identity.yml'
try {
& tools\ArchiCrowdin\archi.ps1 -u
} finally {
Remove-Item 'tools\ArchiCrowdin\crowdin_identity.yml'
}
}
deploy:
- provider: GitHub
tag: $(appveyor_repo_tag_name)
release: ASF-ui v$(appveyor_repo_tag_name)
description: '### Notice\n\nThis is automated AppVeyor GitHub deployment, human-readable description should be available soon. In the meantime please refer to **[GitHub commits](https://github.com/JustArchiNET/ASF-ui/commits/$(appveyor_repo_tag_name))**.'
auth_token:
secure: uYK1wf3znNdkuQqImXR6rZ94ESgzF1vJHCAcJ75Y+m+/pc/Ro6cikzy6O7DVZ39T
artifact: /.*/
draft: false
prerelease: true
force_update: false
on:
branch: master
configuration: Release
appveyor_build_worker_image: Visual Studio 2019
appveyor_repo_tag: true
notifications:
- provider: Webhook
url:
secure: i/og7KzkpbcWcKoUubrLH+KB6bkfqA55FHUlGxLepLmgZNQeNMiMoAFICOFY795fFrFfUNUKqwk7ApXE6HUyWMoiijLj7G/JBLTPkBiTCu8fZMTMqwQm6FiHB3+/0h0C+ukcrBEqnXYSQUh6znpKqJSTrIfXUQ7ftNuC966kBAw=
method: POST
body: >-
{
"avatar_url": "https://www.appveyor.com/assets/img/appveyor-logo-256.png",
"username": "AppVeyor",
"content": "[{{projectName}}:{{branch}}] {{commitMessage}} by {{commitAuthor}} ({{commitId}}) | **{{status}}** on {{buildUrl}}"
}
on_build_success: true
on_build_failure: true
on_build_status_changed: false