-
-
Notifications
You must be signed in to change notification settings - Fork 169
35 lines (33 loc) · 1.34 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
name: publish Ardalis.SmartEnum to nuget
on:
workflow_dispatch:
push:
branches:
- main # Your default release branch
paths:
- 'src/SmartEnum/**'
jobs:
publish:
name: list Ardalis.SmartEnum on nuget.org
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
# Publish
- name: publish on version change
uses: alirezanet/[email protected]
with:
PROJECT_FILE_PATH: src/SmartEnum/SmartEnum.csproj # Relative to repository root
VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file
VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
TAG_COMMIT: true # Flag to enable / disable git tagging
TAG_FORMAT: SmartEnum-v* # Format of the git tag, [*] gets replaced with version
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key