Skip to content

Deploy NuGet Packages #40

Deploy NuGet Packages

Deploy NuGet Packages #40

Workflow file for this run

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 }}