forked from guibranco/BancosBrasileiros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
76 lines (67 loc) · 1.94 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
version: 5.1.{build}
skip_tags: true
skip_branch_with_pr: true
image: Visual Studio 2022
branches:
only:
- main
skip_commits:
files:
- .config/
- .github/
- examples/
- schemas/
- src/
environment:
nodejs_version: 18
npm_auth_token:
secure: utvTJFeOvz8YUfgc/z87ERaWZs4tDNSAe/atkmUagrQjaxniSCqXn0Q4U1UVx1ST
install:
- ps: Install-Product node $env:nodejs_version
- choco install jq
- ps: >-
npm install --loglevel=error
"//registry.npmjs.org/:_authToken=$env:npm_auth_token`n" | out-file "$env:userprofile\.npmrc" -Encoding ASCII
- choco install dart-sdk
- refreshenv
build_script:
- mkdir -p dist
- copy README.md dist\
- copy package.json dist\
- copy data\bancos.json dist\
- cd dist
- git config user.email "[email protected]"
- git config user.name "AppVeyor"
- npm version %APPVEYOR_BUILD_VERSION% -m 'v%APPVEYOR_BUILD_VERSION%'
- npm publish
- cd ..
- cmd: nuget pack BancosBrasileiros.nuspec -Version %APPVEYOR_BUILD_VERSION%
- ps: $response=Invoke-RestMethod 'https://api.github.com/repos/guibranco/bancosbrasileiros/actions/artifacts?name=releaseNotesFile'
- ps: $releaseNotesUrl=$response.artifacts[0].archive_download_url
- ps: $headers = @{Authorization = "Bearer $env:GITHUB_TOKEN"}
- ps: Invoke-WebRequest -Uri $releaseNotesUrl -OutFile release-notes.zip -Headers $headers
- 7z x release-notes.zip
- ps: $env:release_notes=$(cat release-notes.md)
- dart pub get
- dart test
artifacts:
- path: '**\*nupkg'
name: Package
deploy:
- provider: NuGet
api_key: $(NUGET_TOKEN)
skip_symbols: false
on:
branch: main
- provider: GitHub
on:
branch: main
tag: v$(appveyor_build_version)
description: Release of Bancos Brasileiros - v$(appveyor_build_version) \n $(release_notes)
auth_token: $(GITHUB_TOKEN)
force_update: true
artifact: Package
- provider: script
script: dart pub publish --dry-run
on:
branch: main