-
Notifications
You must be signed in to change notification settings - Fork 7
38 lines (30 loc) · 1015 Bytes
/
publish.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
name: Publish
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
env:
BUILD_CONFIG: release
name: Test and publish
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v3
- name: Install dependencies
working-directory: src
run: dotnet restore
- name: Build
working-directory: src/Nethermind.Int256
run: dotnet build -c ${{ env.BUILD_CONFIG }} --no-restore -p:Commit=$GITHUB_SHA
- name: Test
working-directory: src/Nethermind.Int256.Test
run: dotnet test -c ${{ env.BUILD_CONFIG }} --no-restore
- name: Publish
working-directory: src/Nethermind.Int256
run: |
dotnet pack -c ${{ env.BUILD_CONFIG }} --no-build
dotnet nuget push bin/${{ env.BUILD_CONFIG }}/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json