This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
appveyor.yml
77 lines (66 loc) · 2.11 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
image: Visual Studio 2017
platform:
- x64
environment:
global:
JOBS: '1'
FORCE_COLOR: '1'
MOCHA_REPORTER: 'mocha-appveyor-reporter'
GYP_MSVS_VERSION: '2017'
matrix:
- nodejs_version: '12.7.0'
cache:
- node_modules -> yarn.lock
- '%LOCALAPPDATA%\Yarn\Cache -> yarn.lock'
- '%LOCALAPPDATA%\electron\Cache -> yarn.lock'
init:
- git config --global core.autocrlf input
install:
- ps: Update-NodeJsInstallation $Env:nodejs_version $Env:PLATFORM
- appveyor-retry cinst yarn -iy --no-progress
- node --version
- yarn --version
- appveyor-retry yarn --non-interactive
build: off
test_script:
- yarn lint
- yarn test
after_test:
- yarn cross-env NODE_ENV=production ember electron:build -e production --output-path electron-out/ember
- ps: |
if (Test-Path Env:CSC_LINK) {
Add-Path 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit'
$cscFile = Join-Path -Path "$Env:TMP" -ChildPath csc.p12
[IO.File]::WriteAllBytes($cscFile, [Convert]::FromBase64String($Env:CSC_LINK))
Set-AppveyorBuildVariable -Name 'CSC_FILE' -Value $cscFile
}
- yarn cross-env NODE_ENV=production ember electron:make -e production --build-path electron-out/ember
- ps: |
if (Test-Path Env:CSC_FILE) {
Remove-Item -Path $Env:CSC_FILE -ErrorAction Ignore
}
artifacts:
- path: electron-out\make\*.zip
name: zip
- path: electron-out\make\squirrel.windows\$(PLATFORM)\*.exe
name: exe
- path: electron-out\make\squirrel.windows\$(PLATFORM)\*.nupkg
name: nupkg
- path: electron-out\make\squirrel.windows\$(PLATFORM)\RELEASES
name: releases
before_deploy:
- ps: |
$package = Get-Content -Raw -Path package.json | ConvertFrom-Json
$release = "$($package.productName) $($Env:APPVEYOR_REPO_TAG_NAME.Substring(1))"
Set-AppveyorBuildVariable -Name 'GITHUB_RELEASE' -Value $release
deploy:
- provider: GitHub
auth_token: $(GITHUB_TOKEN)
tag: $(APPVEYOR_REPO_TAG_NAME)
release: $(GITHUB_RELEASE)
artifact: zip, exe, nupkg, releases
draft: true
prerelease: true
force_update: true
on:
APPVEYOR_REPO_TAG: true