-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.14 KB
/
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
name: Publish NuGet Package
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
global-json-file: 'global.json'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
working-directory: ImageSize
- name: Test
run: dotnet test --no-build --verbosity normal
working-directory: ImageSize
- name: Pack
run: dotnet pack --no-build --configuration Release /p:PackageVersion=${{ github.ref }} -o out
working-directory: ImageSize
- name: Push to NuGet
# run: dotnet nuget push out/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
# working-directory: ImageSize
run: dotnet nuget push ImageSize/ImageSize/bin/Release/*.nupkg -k ${GITHUB_TOKEN} -s https://nuget.pkg.github.com/dorucioclea/index.json --skip-duplicate --no-symbols true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}