forked from AdrianCassar/Xenia-WebServices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
42 lines (34 loc) · 1.25 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
# Test against the latest version of this Node.js version
environment:
nodejs_version: "16"
# Install scripts. (runs after repo cloning)
install:
- ps: $env:package_version = (Get-Content -Raw -Path package.json | ConvertFrom-Json).version
- ps: Update-AppveyorBuild -Version "$env:package_version-$env:APPVEYOR_BUILD_NUMBER"
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install modules
- npm install
cache:
- C:\projects\Xenia-WebServices\node_modules
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
# run tests
- npm test
build_script:
- npm run build
- 7z a dist.zip ./dist/*
- rm -rf dist
artifacts:
- path: dist.zip
name: Xenia-WebServices
on_success:
- ps: if ($env:APPVEYOR_REPO_BRANCH -eq "main") {C:\projects\Xenia-WebServices\build_scripts\discord-webhook.ps1 success $env:DISCORD_WEBHOOK_URL}
on_failure:
- ps: if ($env:APPVEYOR_REPO_BRANCH -eq "main") {C:\projects\Xenia-WebServices\build_scripts\discord-webhook.ps1 failure $env:DISCORD_WEBHOOK_URL}
# Not yet!
#deploy_script:
# - ps: if ($env:APPVEYOR_REPO_BRANCH -eq "main") {C:\projects\Xenia-WebServices\build_scripts\trigger-redeploy.ps1}