Skip to content

Commit aab4a68

Browse files
committed
Initial commit
0 parents  commit aab4a68

File tree

11 files changed

+667
-0
lines changed

11 files changed

+667
-0
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Generate NuGet package
2+
3+
# Workflow Triggers: https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events
4+
on:
5+
release:
6+
types: [published]
7+
jobs:
8+
pack:
9+
name: Create NuGet package
10+
# Virtual environment: https://help.github.com/en/articles/virtual-environments-for-github-actions
11+
runs-on: windows-latest
12+
needs: versioncheck
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v1
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Dump GitHub context
20+
env:
21+
GITHUB_CONTEXT: ${{ toJson(github) }}
22+
run: echo %GITHUB_CONTEXT%
23+
24+
- name: Get tag name
25+
env:
26+
TAG_NAME: ${{ github.event.release.tag_name }}
27+
run: echo %TAG_NAME%
28+
29+
- name: Remove version prefix
30+
if: startsWith(github.event.release.tag_name, 'v')
31+
run: |
32+
echo ::set-env name=TAG_NAME::%TAG_NAME:~1%
33+
echo %TAG_NAME%
34+
env:
35+
TAG_NAME: ${{ github.event.release.tag_name }}
36+
37+
- name: Get version and suffix
38+
run: |
39+
echo %TAG_NAME%
40+
for /f "tokens=1,2 delims=-" %%a in ("%TAG_NAME%") do set version=%%a&set suffix=%%b
41+
echo %version%
42+
echo %suffix%
43+
echo ::set-env name=VERSION::%version%
44+
echo ::set-env name=SUFFIX::%suffix%
45+
46+
- name: Get nuspec path
47+
run: |
48+
for /f "tokens=*" %%a in ('dir *.nuspec /b /s') do set nuspecpath=%%~dpa
49+
echo %nuspecpath%
50+
echo ::set-env name=NUSPECPATH::%nuspecpath%
51+
52+
- name: install nuget
53+
run: choco install nuget.commandline -y
54+
55+
- name: nuget pack
56+
run: |
57+
echo %NUSPECPATH%
58+
echo %SUFFIX%
59+
if %SUFFIX%=='' (nuget pack %NUSPECPATH% -build -Prop Configuration=Release -OutputDirectory "D:\\package\\")else (nuget pack %NUSPECPATH% -Suffix %SUFFIX% -build -Prop Configuration=Release -OutputDirectory "D:\\package\\")
60+
61+
- name: nuget publish
62+
run: nuget push D:\package\github_release_nuget_workflow.%TAG_NAME%.nupkg ${{secrets.NUGET_TOKEN}} -Source https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)