forked from dementeddevil/BarcodeRenderingFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.97 KB
/
main.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
name: Deploy NuGet Packages
on:
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0'
- name: Build and pack T2t.Barcode.Core
run: |
dotnet restore src/T2t.Barcode.Core/T2t.Barcode.Core.csproj --source "https://api.nuget.org/v3/index.json"
dotnet build src/T2t.Barcode.Core/T2t.Barcode.Core.csproj --configuration Release --no-restore -p:Version="${{ github.ref_name }}"
- name: Build and pack T2t.Barcode.Drawing
run: |
dotnet restore src/T2t.Barcode.Drawing/T2t.Barcode.Drawing.csproj --source "https://api.nuget.org/v3/index.json"
dotnet build src/T2t.Barcode.Drawing/T2t.Barcode.Drawing.csproj --configuration Release --no-restore -p:Version="${{ github.ref_name }}"
- name: Build and pack T2t.Barcode.Skia
run: |
dotnet restore src/T2t.Barcode.Skia/T2t.Barcode.Skia.csproj --source "https://api.nuget.org/v3/index.json"
dotnet build src/T2t.Barcode.Skia/T2t.Barcode.Skia.csproj --configuration Release --no-restore -p:Version="${{ github.ref_name }}"
- name: Build and pack T2t.Barcode.Svg
run: |
dotnet restore src/T2t.Barcode.Svg/T2t.Barcode.Svg.csproj --source "https://api.nuget.org/v3/index.json"
dotnet build src/T2t.Barcode.Svg/T2t.Barcode.Svg.csproj --configuration Release --no-restore -p:Version="${{ github.ref_name }}"
# Don't manage to push on nuget.org => have to upload manually
# dotnet nuget push "src/*/nupkg/*.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY }}
- name: Publish to NuGet and Github
run: |
ls src/*/nupkg/*
dotnet nuget push "src/*/nupkg/*.nupkg" --source "https://nuget.pkg.github.com/tool2team/index.json" --api-key ${{ secrets.PKGREG_TOKEN }}