-
Notifications
You must be signed in to change notification settings - Fork 86
124 lines (103 loc) · 4.29 KB
/
Copy pathci.yml
File metadata and controls
124 lines (103 loc) · 4.29 KB
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
name: CI
permissions:
contents: read
on:
push:
branches:
- main
- vnext
- 'fix/*'
- 'feature/*'
pull_request:
branches:
- main
- vnext
workflow_dispatch:
defaults:
run:
shell: pwsh
jobs:
build:
permissions:
contents: write
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-2025-vs2026, ubuntu-24.04, macos-26 ]
fail-fast: false
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
with:
egress-policy: audit
- name: Checkout
uses: gittools/cicd/checkout@824c3d773fb5d1b00c26b474ae88b7ce9ae555ee # v5
with:
op_service_account_token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
fetch-depth: 0
- run: |
npm install --ignore-scripts
name: Install dependencies
- run: |
npm run lint:check && npm run format:check && npm run mdlint:check
name: Check code formatting
- run: |
npm run build:tools
npm run build:agent:github
npm run build:agent:azure
name: Build code
- run: |
npm run test:ci
name: Run tests
- name: Test Summary
uses: test-summary/action@37b508cfee6d4d080eedd00b5bb240a6a784a6a5 # v2.6
if: always()
with:
paths: junit-report.xml
- name: gitversion/setup
uses: ./gitversion/setup
with:
versionSpec: '6.7.x'
nugetConfigPath: '${{ github.workspace }}/nuget.config'
- name: gitversion/command (showvariable)
uses: ./gitversion/command
with:
targetPath: './'
arguments: '/showvariable FullSemVer'
- name: gitversion/command (format)
uses: ./gitversion/command
with:
targetPath: './'
arguments: '/format {Major}.{Minor}'
- name: gitversion/execute
id: gitversion # step id used as a reference for output values
uses: ./gitversion/execute
with:
targetPath: './'
disableCache: true
disableNormalization: false
overrideConfig: |
semantic-version-format=Loose
- run: |
echo "Major (env.major) : ${{ env.major }}"
echo "Major (env.GitVersion_Major) : ${{ env.GitVersion_Major }}"
echo "Major (steps.gitversion.outputs.major) : ${{ steps.gitversion.outputs.major }}"
echo "Major (steps.gitversion.outputs.GitVersion_Major) : ${{ steps.gitversion.outputs.GitVersion_Major }}"
echo "Minor (env.minor) : ${{ env.minor }}"
echo "Minor (env.GitVersion_Minor) : ${{ env.GitVersion_Minor }}"
echo "Minor (steps.gitversion.outputs.minor) : ${{ steps.gitversion.outputs.minor }}"
echo "Minor (steps.gitversion.outputs.GitVersion_Minor) : ${{ steps.gitversion.outputs.GitVersion_Minor }}"
echo "Patch (env.patch) : ${{ env.patch }}"
echo "Patch (env.GitVersion_Patch) : ${{ env.GitVersion_Patch }}"
echo "Patch (steps.gitversion.outputs.patch) : ${{ steps.gitversion.outputs.patch }}"
echo "Patch (steps.gitversion.outputs.GitVersion_Patch) : ${{ steps.gitversion.outputs.GitVersion_Patch }}"
echo "FullSemVer (env.fullSemVer) : ${{ env.fullSemVer }}"
echo "FullSemVer (env.GitVersion_FullSemVer) : ${{ env.GitVersion_FullSemVer }}"
echo "FullSemVer (steps.gitversion.outputs.fullSemVer) : ${{ steps.gitversion.outputs.fullSemVer }}"
echo "FullSemVer (steps.gitversion.outputs.GitVersion_FullSemVer) : ${{ steps.gitversion.outputs.GitVersion_FullSemVer }}"
name: Use variables and output
- uses: gittools/cicd/git-commit-push@824c3d773fb5d1b00c26b474ae88b7ce9ae555ee # v5
if: matrix.os == 'ubuntu-24.04'
with:
message: 'dist update'
name: Rebuild dist and push