forked from GitTools/actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci.yml
127 lines (114 loc) · 4.41 KB
/
ci.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
trigger:
- main
- 'fix/*'
- 'feature/*'
pr:
- main
variables:
- group: gittools-actions
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: 'true'
- name: DOTNET_CLI_TELEMETRY_OPTOUT
value: 'true'
- name: INPUT_VERSIONSPEC
value: '6.1.x'
- name: INPUT_INCLUDEPRERELEASE
value: 'false'
- name: INPUT_IGNOREFAILEDSOURCES
value: 'true'
- name: INPUT_PREFERLATESTVERSION
value: 'false'
jobs:
- job: build
displayName: ''
strategy:
matrix:
'ubuntu-latest':
imageName: 'ubuntu-latest'
'macos-latest':
imageName: 'macos-15'
'windows-latest':
imageName: 'windows-latest'
pool:
vmImage: $(imageName)
steps:
- checkout: self
displayName: Checkout
fetchDepth: '0'
- pwsh: |
npm install
displayName: 'Install dependencies'
- pwsh: |
npm run lint:check && npm run format:check && npm run mdlint:check
displayName: 'Check code formatting'
- pwsh: |
npm run build:tools
npm run build:agent:github
npm run build:agent:azure
npx tfx extension create --root ./dist/azure --manifest-js ./dist/azure/manifest.config.cjs
Expand-Archive -Path gittools.gittools-0.0.1.vsix -DestinationPath dist/vsix
displayName: 'Build code'
- pwsh: |
npm run test:ci
displayName: 'Run tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'junit-report.xml'
displayName: 'Test Summary'
- pwsh: |
# set the inputs for the 'gitversion/setup' action
$env:INPUT_VERSIONSPEC = "$(INPUT_VERSIONSPEC)"
$env:INPUT_INCLUDEPRERELEASE = "$(INPUT_INCLUDEPRERELEASE)"
$env:INPUT_IGNOREFAILEDSOURCES = "$(INPUT_IGNOREFAILEDSOURCES)"
$env:INPUT_PREFERLATESTVERSION = "$(INPUT_PREFERLATESTVERSION)"
# run the 'gitversion/setup' action
node gitversion/setup/main.mjs
displayName: gitversion/setup
workingDirectory: dist/vsix
- pwsh: |
# set the inputs for the 'gitversion/command' action
$env:INPUT_TARGETPATH = './'
$env:INPUT_ARGUMENTS = '/showvariable FullSemVer'
# run the 'gitversion/command' action
node gitversion/command/main.mjs
displayName: gitversion/command (showvariable)
workingDirectory: dist/vsix
- pwsh: |
# set the inputs for the 'gitversion/command' action
$env:INPUT_TARGETPATH = './'
$env:INPUT_ARGUMENTS = '/format {Major}.{Minor}'
# run the 'gitversion/command' action
node gitversion/command/main.mjs
displayName: gitversion/command (format)
workingDirectory: dist/vsix
- pwsh: |
# set the inputs for the 'gitversion/execute' action
$env:INPUT_TARGETPATH = './'
$env:INPUT_DISABLECACHE = 'true'
$env:INPUT_DISABLENORMALIZATION = 'false'
$env:INPUT_OVERRIDECONFIG = '
update-build-number=false'
# run the 'gitversion/execute' action
node gitversion/execute/main.mjs
name: version
displayName: gitversion/execute
workingDirectory: dist/vsix
- pwsh: |
echo "Major (major) : $(major)"
echo "Major (GitVersion_Major) : $(GitVersion_Major)"
echo "Major (version.major) : $(version.major)"
echo "Major (version.GitVersion_Major) : $(version.GitVersion_Major)"
echo "Minor (minor) : $(minor)"
echo "Minor (GitVersion_Minor) : $(GitVersion_Minor)"
echo "Minor (version.minor) : $(version.minor)"
echo "Minor (version.GitVersion_Minor) : $(version.GitVersion_Minor)"
echo "Patch (patch) : $(patch)"
echo "Patch (GitVersion_Patch) : $(GitVersion_Patch)"
echo "Patch (version.patch) : $(version.patch)"
echo "Patch (version.GitVersion_Patch) : $(version.GitVersion_Patch)"
echo "FullSemVer (fullSemVer) : $(fullSemVer)"
echo "FullSemVer (GitVersion_FullSemVer) : $(GitVersion_FullSemVer)"
echo "FullSemVer (version.fullSemVer) : $(version.fullSemVer)"
echo "FullSemVer (version.GitVersion_FullSemVer) : $(version.GitVersion_FullSemVer)"
displayName: Use variables and output