This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
73 lines (52 loc) · 2.27 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: 1.0.{build}
only_commits:
files:
- projects/ngrx-message-bus/
environment:
# Node version which will be used for compiling application.
nodejs_version: "13.7.0"
# Name of library package
LIBRARY_NAME: "ngrx-message-bus"
# API Key used for deploying to MyGet npm.
API_KEY_MY_GET:
secure: 0HqMlO4KT03m1Obda0ta46zbO1EgtiSouotet2O7J7QU5SMEJfrv+GgM0cuNPL9l
API_KEY_NPM:
secure: nIeG09zqUgJaPWS4YclqB4s/BDnoy0DrNiwvLl+p9eQZknDycbInyKs4uEF6JBbk
install:
# Get the latest stable version of Node.js.
- ps: Install-Product node $env:nodejs_version
# Install npm package.
- npm install --loglevel=error
# Install angular-cli as global package.
- npm install @angular/cli -g
# Install protractor
# - npm install protractor -g
# Install web driver.
# - webdriver-manager update
build_script:
# Build application in production mode.
- ng build %LIBRARY_NAME% --prod
#test_script:
# Run unit test for ngrx-message-bus project.
# - protractor projects/ngrx-message-bus/e2e/protractor.conf.js
after_build:
# Copy README.md to distributed folder.
- copy README.md "dist/%LIBRARY_NAME%/" /Y
before_deploy:
- SET SHOULD_DEPLOYMENT_DONE=false
- SET NPM_API_KEY=""
- SET NPM_ENDPOINT=""
- IF "%APPVEYOR_REPO_BRANCH%" == "release" SET SHOULD_DEPLOYMENT_DONE=true
- IF "%APPVEYOR_REPO_BRANCH%" == "release" SET NPM_API_KEY=%API_KEY_NPM%
- IF "%APPVEYOR_REPO_BRANCH%" == "release" SET NPM_ENDPOINT="www.npmjs.org"
- IF "%APPVEYOR_REPO_BRANCH%" == "preview" SET SHOULD_DEPLOYMENT_DONE=true
- IF "%APPVEYOR_REPO_BRANCH%" == "preview" SET NPM_API_KEY=%API_KEY_MY_GET%
- IF "%APPVEYOR_REPO_BRANCH%" == "preview" SET NPM_ENDPOINT="www.myget.org"
deploy_script:
- IF "%SHOULD_DEPLOYMENT_DONE%" == "true" cd /d "dist/%LIBRARY_NAME%"
- IF "%APPVEYOR_REPO_BRANCH%" == "preview" echo registry=https://www.myget.org/F/%LIBRARY_NAME%/npm/ >> .npmrc
- IF "%APPVEYOR_REPO_BRANCH%" == "preview" echo always-auth=true >> .npmrc
- IF "%APPVEYOR_REPO_BRANCH%" == "preview" echo //www.myget.org/F/%LIBRARY_NAME%/npm/:_authToken=%NPM_API_KEY% >> .npmrc
- IF "%APPVEYOR_REPO_BRANCH%" == "release" echo //registry.npmjs.org/:_authToken=%API_KEY_NPM% >> .npmrc
# Publish package to npm server.
- IF "%SHOULD_DEPLOYMENT_DONE%" == "true" npm publish