-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (41 loc) · 1.4 KB
/
dotnet-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
39
40
41
42
43
44
45
46
47
48
49
50
51
name: .NET Nuget Publish
on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
pull-requests: write
actions: write
issues: write
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Build and Publish Nuget
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: |
sudo apt-get install libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev
sudo apt-get install libc6-dev libicu-dev libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev librocksdb-dev
sudo apt-get install librocksdb-dev
dotnet tool install --global dotnet-reportgenerator-globaltool
dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Pack Nuget
run: dotnet pack --configuration Release --no-restore
- name: Publish Nuget
run: |
dotnet nuget push ./Phantasma.RPC.Sharp/bin/Release/Phantasma.RPC.Sharp.*.nupkg --skip-duplicate -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json