-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (31 loc) · 1.11 KB
/
package-release-nuget-org.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: Package release to nuget.org
on:
workflow_dispatch:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+\-preview.[0-9]+'
jobs:
pack:
name: Package and publish
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Build the projects in solution by building the project that uses them all
run: dotnet build src/UDS.Net.Web.MVC -c Release
- name: Pack UDS.Net.Forms
run: dotnet pack src/UDS.Net.Forms -c Release -o .
- name: Pack UDS.Net.Services
run: dotnet pack src/UDS.Net.Services -c Release -o .
- name: Push packages to Nuget.org
run: dotnet nuget push UDS.Net.*.nupkg -k $NUGET_AUTH_TOKEN --source 'https://api.nuget.org/v3/index.json' --skip-duplicate --no-symbols
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_ORG_TOKEN }}