-
Notifications
You must be signed in to change notification settings - Fork 25
40 lines (33 loc) · 1.14 KB
/
build-test-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
name: Build, Test and Publish
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.400
source-url: https://nuget.pkg.github.com/lucassklp/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: dotnet restore
- name: Build
run: |
cd Desktop.Robot
dotnet build --configuration Release --no-restore
- name: Pack
run: |
cd Desktop.Robot
dotnet pack -c Release -o out
- name: Push Desktop.Robot to GitHub registry
run: |
dotnet nuget sources add -name "GPR" -Source https://nuget.pkg.github.com/lucassklp/index.json -Username lucassklp -Password ${{ secrets.GITHUB_TOKEN }}
dotnet nuget push ./Desktop.Robot/out/*.nupkg --skip-duplicate
- name: Publish Desktop.Robot to nuget.org
run: |
dotnet nuget push ./Desktop.Robot/out/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate