Skip to content

Commit 32c117e

Browse files
committed
updates csproj and yml
1 parent aa298d3 commit 32c117e

File tree

2 files changed

+45
-31
lines changed

2 files changed

+45
-31
lines changed

.github/workflows/main.yml

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,51 @@
1-
# This is a basic workflow to help you get started with Actions
2-
3-
name: CI
4-
5-
# Controls when the action will run.
1+
name: publish to nuget
62
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
83
push:
9-
branches: [ master ]
10-
pull_request:
11-
branches: [ master ]
12-
13-
# Allows you to run this workflow manually from the Actions tab
14-
workflow_dispatch:
15-
16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
4+
branches:
5+
- master # Default release branch
176
jobs:
18-
# This workflow contains a single job called "build"
19-
build:
20-
# The type of runner that the job will run on
7+
publish:
8+
name: build, pack & publish
219
runs-on: ubuntu-latest
22-
23-
# Steps represent a sequence of tasks that will be executed as part of the job
2410
steps:
25-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2611
- uses: actions/checkout@v2
2712

28-
# Runs a single command using the runners shell
29-
- name: Run a one-line script
30-
run: echo Hello, world!
13+
# - name: Setup dotnet
14+
# uses: actions/setup-dotnet@v1
15+
# with:
16+
# dotnet-version: 3.1.200
17+
18+
# Publish
19+
- name: publish on version change
20+
id: publish_nuget
21+
uses: rohith/publish-nuget@v2
22+
with:
23+
# Filepath of the project to be packaged, relative to root of repository
24+
PROJECT_FILE_PATH: Extensions/Extensions.csproj
25+
26+
# NuGet package id, used for version detection & defaults to project name
27+
PACKAGE_NAME: Extension.Methods
28+
29+
# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
30+
# VERSION_FILE_PATH: Directory.Build.props
31+
32+
# Regex pattern to extract version info in a capturing group
33+
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
34+
35+
# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
36+
# VERSION_STATIC: 1.0.0
37+
38+
# Flag to toggle git tagging, enabled by default
39+
TAG_COMMIT: true
40+
41+
# Format of the git tag, [*] gets replaced with actual version
42+
TAG_FORMAT: v*
43+
44+
# API key to authenticate with NuGet server
45+
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
46+
47+
# NuGet server uri hosting the packages, defaults to https://api.nuget.org
48+
# NUGET_SOURCE: https://api.nuget.org
3149

32-
# Runs a set of commands using the runners shell
33-
- name: Run a multi-line script
34-
run: |
35-
echo Add other actions to build,
36-
echo test, and deploy your project.
50+
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
51+
# INCLUDE_SYMBOLS: false

Extensions/Extensions.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ Adds new extensions for string, number and generic</Description>
1616
<RepositoryUrl>https://github.com/ssswagatss/extension-methods</RepositoryUrl>
1717
<RepositoryType>Public</RepositoryType>
1818
<PackageTags>c-sharp extension-methods c# helper-methods</PackageTags>
19-
<Version>0.2.0</Version>
20-
<PackageReleaseNotes>Adds new methods for String Extensions.
21-
Updates documentations with proper examples.</PackageReleaseNotes>
19+
<Version>0.3.0</Version>
20+
<PackageReleaseNotes>Fixes issues with Datetime methods</PackageReleaseNotes>
2221
</PropertyGroup>
2322

2423
<ItemGroup>

0 commit comments

Comments
 (0)