-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (64 loc) · 1.85 KB
/
nuget-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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build & Publish NuGet Package
on:
push:
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
paths-ignore:
- '**.md'
workflow_dispatch:
inputs:
version_number:
description: "Package version, e.g. 1.10.5"
required: true
type: string
env:
VERSION: ${{ inputs.version_number || github.ref_name }}
jobs:
publish-core:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Dotnet
uses: actions/setup-dotnet@v4
with:
cache: true
cache-dependency-path: '**/packages.lock.json'
dotnet-version: |
8.0.x
9.0.x
- name: Pack
run: |
dotnet pack --configuration Release --property:Version=${VERSION#v} --output . src/core/SimpleCDN.csproj
- name: Push
run: |
dotnet nuget push SimpleCDN.${VERSION#v}.nupkg --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
publish-redis-extension:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Dotnet
uses: actions/setup-dotnet@v4
with:
cache: true
cache-dependency-path: '**/packages.lock.json'
dotnet-version: |
8.0.x
9.0.x
- name: Pack
run: |
dotnet pack --configuration Release --property:Version=${VERSION#v} --output . extensions/Redis/SimpleCDN.Extensions.Redis.csproj
- name: Push
run: |
dotnet nuget push SimpleCDN.Extensions.Redis.${VERSION#v}.nupkg --api-key ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}