@@ -3,24 +3,24 @@ name: 'Build hasher'
3
3
on :
4
4
push :
5
5
branches :
6
- - ' **'
6
+ - ' **'
7
7
paths :
8
- - ' .github/workflows/**'
9
- - ' src/**'
10
- - ' *.sln'
11
- - ' *.config'
12
- - ' *.props'
13
- - ' *.targets'
8
+ - ' .github/workflows/**'
9
+ - ' src/**'
10
+ - ' *.sln'
11
+ - ' *.config'
12
+ - ' *.props'
13
+ - ' *.targets'
14
14
pull_request :
15
15
branches :
16
- - ' **'
16
+ - ' **'
17
17
paths :
18
- - ' .github/workflows/**'
19
- - ' src/**'
20
- - ' *.sln'
21
- - ' *.config'
22
- - ' *.props'
23
- - ' *.targets'
18
+ - ' .github/workflows/**'
19
+ - ' src/**'
20
+ - ' *.sln'
21
+ - ' *.config'
22
+ - ' *.props'
23
+ - ' *.targets'
24
24
25
25
defaults :
26
26
run :
@@ -33,111 +33,112 @@ jobs:
33
33
strategy :
34
34
matrix :
35
35
system :
36
- - windows-2022
36
+ - windows-2022
37
37
config :
38
- - Debug
39
- - Release
38
+ - Debug
39
+ - Release
40
40
framework :
41
- - net8.0
41
+ - net8.0
42
42
43
43
runs-on : ${{ matrix.system }}
44
44
45
45
env :
46
46
HasherProject : src\ImeSense.Launchers.Belarus.CryptoHasher\ImeSense.Launchers.Belarus.CryptoHasher.csproj
47
47
48
48
steps :
49
- - name : Checkout
50
- uses : actions/checkout@v4
51
- with :
52
- fetch-depth : 0
53
-
54
- - name : Setup .NET
55
- uses : actions/setup-dotnet@v4
56
- with :
57
- dotnet-version : ' 8.0.x'
58
-
59
- - name : Cache dependencies
60
- uses : actions/cache@v4
61
- with :
62
- key : Hasher-NuGet-${{ hashFiles('**/packages.lock.json') }}
63
- restore-keys : |
64
- Hasher-NuGet-${{ hashFiles('**/packages.lock.json') }}
65
- Hasher-NuGet-
66
- path : |
67
- ~/.nuget/packages
68
-
69
- - name : Restore dependencies
70
- run : |
71
- dotnet restore $env:HasherProject
72
-
73
- - name : Build hasher
74
- run : |
75
- dotnet build $env:HasherProject `
76
- --configuration ${{ matrix.config }} `
77
- --no-restore
78
-
79
- - name : Upload hasher
80
- uses : actions/upload-artifact@v4
81
- with :
82
- name : hasher-${{ matrix.framework }}-${{ matrix.config }}-${{ github.sha }}
83
- path : bin/${{ matrix.config }}/
49
+ - name : Checkout
50
+ uses : actions/checkout@v4
51
+ with :
52
+ fetch-depth : 0
53
+
54
+ - name : Setup .NET
55
+ uses : actions/setup-dotnet@v4
56
+ with :
57
+ dotnet-version : ' 8.0.x'
58
+
59
+ - name : Cache dependencies
60
+ uses : actions/cache@v4
61
+ with :
62
+ key : Hasher-NuGet-${{ hashFiles('**/packages.lock.json') }}
63
+ restore-keys : |
64
+ Hasher-NuGet-${{ hashFiles('**/packages.lock.json') }}
65
+ Hasher-NuGet-
66
+ path : |
67
+ ~/.nuget/packages
68
+
69
+ - name : Restore dependencies
70
+ run : |
71
+ dotnet restore $env:HasherProject
72
+
73
+ - name : Build hasher
74
+ run : |
75
+ dotnet build $env:HasherProject `
76
+ --configuration ${{ matrix.config }} `
77
+ --no-restore
78
+
79
+ - name : Upload hasher
80
+ uses : actions/upload-artifact@v4
81
+ with :
82
+ name : hasher-${{ matrix.framework }}-${{ matrix.config }}-${{ github.sha }}
83
+ path : bin/${{ matrix.config }}/
84
84
85
85
publish-hasher :
86
86
name : ' Publish hasher'
87
87
88
- needs : build-hasher
88
+ needs :
89
+ - build-hasher
89
90
90
91
strategy :
91
92
matrix :
92
93
system :
93
- - windows-2022
94
+ - windows-2022
94
95
config :
95
- - Release
96
+ - Release
96
97
runtime :
97
- - win-x64
98
+ - win-x64
98
99
framework :
99
- - net8.0
100
+ - net8.0
100
101
101
102
runs-on : ${{ matrix.system }}
102
103
103
104
env :
104
105
HasherProject : src\ImeSense.Launchers.Belarus.CryptoHasher\ImeSense.Launchers.Belarus.CryptoHasher.csproj
105
106
106
107
steps :
107
- - name : Checkout
108
- uses : actions/checkout@v4
109
- with :
110
- fetch-depth : 0
111
-
112
- - name : Setup .NET
113
- uses : actions/setup-dotnet@v4
114
- with :
115
- dotnet-version : ' 8.0.x'
116
-
117
- - name : Cache dependencies
118
- uses : actions/cache@v4
119
- with :
120
- key : Hasher-NuGet-${{ hashFiles('**/packages.lock.json') }}
121
- restore-keys : |
122
- Hasher-NuGet-${{ hashFiles('**/packages.lock.json') }}
123
- Hasher-NuGet-
124
- path : |
125
- ~/.nuget/packages
126
-
127
- - name : Publish hasher
128
- run : |
129
- dotnet publish $env:HasherProject `
130
- --configuration ${{ matrix.config }} `
131
- --runtime ${{ matrix.runtime }} `
132
- --self-contained true `
133
- -p:PublishAot=true `
134
- -p:InvariantGlobalization=false `
135
- -p:IsAotCompatible=true `
136
- -p:DebugSymbols=false `
137
- -p:DebugType=None
138
-
139
- - name : Upload hasher
140
- uses : actions/upload-artifact@v4
141
- with :
142
- name : hasher-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
143
- path : bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/
108
+ - name : Checkout
109
+ uses : actions/checkout@v4
110
+ with :
111
+ fetch-depth : 0
112
+
113
+ - name : Setup .NET
114
+ uses : actions/setup-dotnet@v4
115
+ with :
116
+ dotnet-version : ' 8.0.x'
117
+
118
+ - name : Cache dependencies
119
+ uses : actions/cache@v4
120
+ with :
121
+ key : Hasher-NuGet-${{ hashFiles('**/packages.lock.json') }}
122
+ restore-keys : |
123
+ Hasher-NuGet-${{ hashFiles('**/packages.lock.json') }}
124
+ Hasher-NuGet-
125
+ path : |
126
+ ~/.nuget/packages
127
+
128
+ - name : Publish hasher
129
+ run : |
130
+ dotnet publish $env:HasherProject `
131
+ --configuration ${{ matrix.config }} `
132
+ --runtime ${{ matrix.runtime }} `
133
+ --self-contained true `
134
+ -p:PublishAot=true `
135
+ -p:InvariantGlobalization=false `
136
+ -p:IsAotCompatible=true `
137
+ -p:DebugSymbols=false `
138
+ -p:DebugType=None
139
+
140
+ - name : Upload hasher
141
+ uses : actions/upload-artifact@v4
142
+ with :
143
+ name : hasher-${{ matrix.framework }}-${{ matrix.runtime }}-${{ github.sha }}
144
+ path : bin/${{ matrix.config }}/${{ matrix.runtime }}/publish/
0 commit comments