@@ -143,7 +143,7 @@ jobs:
143
143
--source https://nuget.pkg.github.com/neo-project/index.json \
144
144
--api-key "${{ secrets.GITHUB_TOKEN }}" \
145
145
--disable-buffering \
146
- --no-service-endpoint;
146
+ --no-service-endpoint
147
147
148
148
- name : Publish to myGet
149
149
working-directory : ./out
@@ -152,95 +152,4 @@ jobs:
152
152
--source https://www.myget.org/F/neo/api/v3/index.json \
153
153
--api-key "${{ secrets.MYGET_TOKEN }}" \
154
154
--disable-buffering \
155
- --no-service-endpoint;
156
-
157
- Release :
158
- if : github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
159
- needs : [Test]
160
- runs-on : ubuntu-latest
161
- steps :
162
- - name : Checkout
163
- uses : actions/checkout@v4
164
-
165
- - name : Get version
166
- id : get_version
167
- run : |
168
- sudo apt install xmlstarlet
169
- find src -name Directory.Build.props | xargs xmlstarlet sel -N i=http://schemas.microsoft.com/developer/msbuild/2003 -t -v "concat('::set-output name=version::v',//i:VersionPrefix/text())" | xargs echo
170
-
171
- - name : Check tag
172
- id : check_tag
173
- run : curl -s -I ${{ format('https://github.com/{0}/releases/tag/{1}', github.repository, steps.get_version.outputs.version) }} | head -n 1 | cut -d$' ' -f2 | xargs printf "::set-output name=statusCode::%s" | xargs echo
174
-
175
- - name : Create release
176
- if : steps.check_tag.outputs.statusCode == '404'
177
- id : create_release
178
- uses : actions/create-release@v1
179
- env :
180
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
181
- with :
182
- tag_name : ${{ steps.get_version.outputs.version }}
183
- release_name : ${{ steps.get_version.outputs.version }}
184
- prerelease : ${{ contains(steps.get_version.outputs.version, '-') }}
185
-
186
- - name : Setup .NET
187
- if : steps.check_tag.outputs.statusCode == '404'
188
- uses : actions/setup-dotnet@v4
189
- with :
190
- dotnet-version : ${{ env.DOTNET_VERSION }}
191
-
192
- - name : Pack (Neo)
193
- if : steps.check_tag.outputs.statusCode == '404'
194
- run : |
195
- dotnet pack ./src/Neo \
196
- --configuration Release \
197
- --output ./out
198
-
199
- - name : Pack (Neo.IO)
200
- if : steps.check_tag.outputs.statusCode == '404'
201
- run : |
202
- dotnet pack ./src/Neo.IO \
203
- --configuration Release \
204
- --output ./out
205
-
206
- - name : Pack (Neo.Extensions)
207
- if : steps.check_tag.outputs.statusCode == '404'
208
- run : |
209
- dotnet pack ./src/Neo.Extensions \
210
- --configuration Release \
211
- --output ./out
212
-
213
- - name : Pack (Neo.Json)
214
- if : steps.check_tag.outputs.statusCode == '404'
215
- run : |
216
- dotnet pack ./src/Neo.Json \
217
- --configuration Release \
218
- --output ./out
219
-
220
- - name : Pack (Neo.VM)
221
- if : steps.check_tag.outputs.statusCode == '404'
222
- run : |
223
- dotnet pack ./src/Neo.VM \
224
- --configuration Release \
225
- --output ./out
226
-
227
- - name : Pack (Neo.ConsoleService)
228
- if : steps.check_tag.outputs.statusCode == '404'
229
- run : |
230
- dotnet pack ./src/Neo.ConsoleService \
231
- --configuration Release \
232
- --output ./out
233
-
234
- - name : Pack (Neo.Cryptography.BLS12_381)
235
- if : steps.check_tag.outputs.statusCode == '404'
236
- run : |
237
- dotnet pack ./src/Neo.Cryptography.BLS12_381 \
238
- --configuration Release \
239
- --output ./out
240
-
241
- - name : Publish to NuGet
242
- if : steps.check_tag.outputs.statusCode == '404'
243
- run : |
244
- dotnet nuget push out/*.nupkg -s https://api.nuget.org/v3/index.json -k ${NUGET_TOKEN} --skip-duplicate
245
- env :
246
- NUGET_TOKEN : ${{ secrets.NUGET_TOKEN }}
155
+ --no-service-endpoint
0 commit comments