-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
66 lines (50 loc) · 1.83 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
image: Visual Studio 2019
environment:
nodejs_version: "20"
branches:
only:
- /^\d+\.\d+/
- /^v\d+\.\d+\.\d+/
init:
- ps: |
Install-Product node $env:nodejs_version
"//registry.npmjs.org/:_authToken=$env:npm_auth_token`n" | out-file "$env:userprofile\.npmrc" -Encoding ASCII
cache:
- node_modules
install:
- cmd: npm install --loglevel error --legacy-peer-deps
build: off
build_script:
- ps: |
$env:NGV_BUILD_NUMBER = $env:APPVEYOR_BUILD_NUMBER
#stable version build
if($env:APPVEYOR_REPO_TAG -eq "true")
{
$env:APPVEYOR_REPO_TAG_NAME -match "^v(\d+\.\d+)\.\d+"
git checkout "$($Matches[1])" -q
npm run version:build
Update-AppveyorBuild -Version "$(cat version.bak)"
$env:NGV_BUILD_NUMBER = -1
npm run deploy
#release on github
$match = [System.Text.RegularExpressions.Regex]::Match((Get-Content "./changelog.md" -Encoding UTF8 | Out-String).TrimEnd(), "## Version \d+\.\d+\.\d+ (?<date>\(\d+-\d+-\d+\))(?<content>.*?)(?:## Version|`$)", [System.Text.RegularExpressions.RegexOptions]::Singleline)
Set-AppveyorBuildVariable 'Changelog' $match.Groups["content"].Value
Set-AppveyorBuildVariable 'ChangeDate' $match.Groups["date"].Value
}
else
{
git checkout $env:APPVEYOR_REPO_BRANCH -q
npm run version:build
Update-AppveyorBuild -Version "$(cat version.bak)"
$env:NGV_BUILD_NUMBER = -1
npm run deploy:next
}
- ps: Update-AppveyorBuild -Version "$(cat version.bak)"
deploy:
- provider: GitHub
description: '$(Changelog)'
auth_token:
secure: FOD7P4H4NF3p30wWrc/CUbtuP1YDUtMGeJgiHGo9P8uwpf+fBcKLxLZ/CLCjTsx1
force_update: true
on:
APPVEYOR_REPO_TAG: true