Skip to content

Commit 3140750

Browse files
committed
Add Publish Action
1 parent a153013 commit 3140750

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.github/workflows/ci.yml renamed to .github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous Integration
1+
name: Build
22

33
on:
44
push:

.github/workflows/publish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish to NuGet
2+
on:
3+
push:
4+
branches:
5+
- master # Default release branch
6+
jobs:
7+
publish:
8+
name: build, pack & publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
# Publish
14+
- name: publish on version change
15+
id: publish_nuget
16+
uses: rohith/publish-nuget@v2
17+
with:
18+
# Filepath of the project to be packaged, relative to root of repository
19+
PROJECT_FILE_PATH: src/Extensions.Configuration.Object/Extensions.Configuration.Object.csproj
20+
21+
# NuGet package id, used for version detection & defaults to project name
22+
PACKAGE_NAME: Extensions.Configuration.Object
23+
24+
# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
25+
# VERSION_FILE_PATH: Directory.Build.props
26+
27+
# Regex pattern to extract version info in a capturing group
28+
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
29+
30+
# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
31+
# VERSION_STATIC: 1.0.0
32+
33+
# Flag to toggle git tagging, enabled by default
34+
# TAG_COMMIT: true
35+
36+
# Format of the git tag, [*] gets replaced with actual version
37+
# TAG_FORMAT: v*
38+
39+
# API key to authenticate with NuGet server
40+
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
41+
42+
# NuGet server uri hosting the packages, defaults to https://api.nuget.org
43+
NUGET_SOURCE: https://api.nuget.org
44+
45+
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
46+
# INCLUDE_SYMBOLS: false
47+

src/Extensions.Configuration.Object/Extensions.Configuration.Object.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<Product>Extensions.Configuration.Object</Product>
77
<Description>A simple way to add configuration using plain objects.</Description>
88
<PackageLicenseExpression>MIT</PackageLicenseExpression>
9+
<PackageId>Extensions.Configuration.Object</PackageId>
910
<PackageProjectUrl>https://github.com/lawrence-laz/Extensions.Configuration.Object</PackageProjectUrl>
1011
<RepositoryUrl>https://github.com/lawrence-laz/Extensions.Configuration.Object</RepositoryUrl>
1112
<PackageTags>configuration;options;object;extensions</PackageTags>

0 commit comments

Comments
 (0)