-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (137 loc) · 5.38 KB
/
pipeline.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
128
129
130
131
132
133
134
135
136
137
138
139
140
name: "build-test (old)"
on: # rebuild any PRs and main branch changes
pull_request:
branches: [main]
push:
branches:
- main
- "releases/*"
paths:
- "src/**"
- "package.json"
jobs:
Build: # make sure build/ci work properly
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node: ["18"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # 0 indicates all history for all branches and tags
- name: GitVersion
id: gitversion # step id used as reference for output values
uses: roryprimrose/rungitversion@v1
- name: Output version values
run: |
# These are also available as environment variables, e.g. GitVersion_Major, or GitVersion_NuGetVersionV2
echo "Major: ${{ steps.gitversion.outputs.Major }}"
echo "Minor: ${{ steps.gitversion.outputs.Minor }}"
echo "Patch: ${{ steps.gitversion.outputs.Patch }}"
echo "PreReleaseTag: ${{ steps.gitversion.outputs.PreReleaseTag }}"
echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.PreReleaseTagWithDash }}"
echo "PreReleaseLabel: ${{ steps.gitversion.outputs.PreReleaseLabel }}"
echo "PreReleaseNumber: ${{ steps.gitversion.outputs.PreReleaseNumber }}"
echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.WeightedPreReleaseNumber }}"
echo "BuildMetaData: ${{ steps.gitversion.outputs.BuildMetaData }}"
echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.BuildMetaDataPadded }}"
echo "FullBuildMetaData: ${{ steps.gitversion.outputs.FullBuildMetaData }}"
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}"
echo "SemVer: ${{ steps.gitversion.outputs.SemVer }}"
echo "LegacySemVer: ${{ steps.gitversion.outputs.LegacySemVer }}"
echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.LegacySemVerPadded }}"
echo "AssemblySemVer: ${{ steps.gitversion.outputs.AssemblySemVer }}"
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.AssemblySemFileVer }}"
echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}"
echo "InformationalVersion: ${{ steps.gitversion.outputs.InformationalVersion }}"
echo "BranchName: ${{ steps.gitversion.outputs.BranchName }}"
echo "Sha: ${{ steps.gitversion.outputs.Sha }}"
echo "ShortSha: ${{ steps.gitversion.outputs.ShortSha }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.NuGetVersionV2 }}"
echo "NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersion }}"
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.NuGetPreReleaseTagV2 }}"
echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.NuGetPreReleaseTag }}"
echo "VersionSourceSha: ${{ steps.gitversion.outputs.VersionSourceSha }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}"
echo "CommitDate: ${{ steps.gitversion.outputs.CommitDate }}"
- name: Setup node v${{ matrix.node }}
uses: actions/setup-node@v4 # https://github.com/actions/setup-node
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install npm@latest
run: |
sudo npm install --global npm@latest
- name: Install dependencies
run: |
npm install
- name: Output Relabeler semantic version
run: |
echo $GitVersion_NuGetVersionV2
- run: |
npm run all
Test: # run just the tests
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node: ["18"]
steps:
- uses: actions/checkout@v4
- name: Setup node v${{ matrix.node }}
uses: actions/setup-node@v4 # https://github.com/actions/setup-node
with:
node-version: ${{ matrix.node }}
cache: npm
- run: |
sudo npm install --global npm@latest
npm install
- run: npm run build
- run: npm test
# Make sure the action works on a clean machine without building.
# This should be run on branches Releases/* in the future and
# 'build run package' should have been run prior.
Execute:
name: Execute
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node: ["18"]
steps:
- name: Checkout repository code
uses: actions/checkout@v4
- name: Setup node v${{ matrix.node }}
uses: actions/setup-node@v4 # https://github.com/actions/setup-node
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install npm@latest
run: |
sudo npm install --global npm@latest
- name: Install dependencies
run: |
npm install
- name: Build & Package
run: |
npm run build
npm run package
- name: Execute action Relabeler
uses: ./
with:
milliseconds: 1200
repositoryToken: ${{ secrets.GITHUB_TOKEN }}