-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (31 loc) · 1.17 KB
/
release.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: Release
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Install latest .NET Core SDK
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100
# Print .NET Core SDK version
- name: Print .NET Core version
run: echo `dotnet --version`
# Restore project dependencies and build in Release mode
- name: Restore dependencies and build RELEASE package
working-directory: ./src/NovaPoshta.Client
run: |
dotnet restore ./NovaPoshta.Client.csproj
dotnet build -c Release ./NovaPoshta.Client.csproj -o nupkg
# Publish release package to Nuget.org
- name: Publish package to Nuget.org
working-directory: ./src/NovaPoshta.Client/nupkg
env:
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
run: |
find . -name *.nupkg -type f -print0 | xargs -0 -I pkg dotnet nuget push pkg -k $nuget_api_key -s "https://api.nuget.org/v3/index.json" --skip-duplicate