Skip to content

Commit 60b0fc7

Browse files
committed
Initial commit
1 parent bfa172e commit 60b0fc7

32 files changed

+2383
-1
lines changed

Diff for: .editorconfig

+368
Large diffs are not rendered by default.

Diff for: .gitattributes

+63
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

Diff for: .github/workflows/dotnet-core.yml

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: .NET Core
2+
on:
3+
pull_request:
4+
release:
5+
types:
6+
- published
7+
env:
8+
# Stop wasting time caching packages
9+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
10+
# Disable sending usage data to Microsoft
11+
DOTNET_CLI_TELEMETRY_OPTOUT: true
12+
# Project name to pack and publish
13+
PROJECT_NAME: Synercoding.Primitives
14+
# GitHub Packages Feed settings
15+
GITHUB_FEED: https://nuget.pkg.github.com/test-net-core-actions/
16+
GITHUB_USER: synercoder
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
# Official NuGet Feed settings
19+
NUGET_FEED: https://api.nuget.org/v3/index.json
20+
NUGET_KEY: ${{ secrets.NUGET_KEY }}
21+
jobs:
22+
build:
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
matrix:
26+
os: [ ubuntu-latest, windows-latest, macos-latest ]
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v2
30+
- name: Setup .NET Core
31+
uses: actions/setup-dotnet@v1
32+
with:
33+
dotnet-version: 3.1.x
34+
- name: Restore
35+
run: dotnet restore
36+
- name: Build
37+
run: dotnet build -c Release --no-restore
38+
- name: Test
39+
run: dotnet test -c Release
40+
- name: Pack
41+
if: matrix.os == 'ubuntu-latest'
42+
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:SymbolPackageFormat=snupkg -p:PackageVersion=$GITHUB_RUN_ID src/$PROJECT_NAME/$PROJECT_NAME.*proj
43+
- name: Upload Artifact
44+
if: matrix.os == 'ubuntu-latest'
45+
uses: actions/upload-artifact@v2
46+
with:
47+
name: nupkg
48+
path: ./artifacts/pkg/Release/${{ env.PROJECT_NAME }}.*.nupkg
49+
prerelease:
50+
needs: build
51+
if: github.ref == 'refs/heads/develop'
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Download Artifact
55+
uses: actions/download-artifact@v1
56+
with:
57+
name: nupkg
58+
- name: Push to GitHub Feed
59+
run: |
60+
for f in ./nupkg/*.nupkg
61+
do
62+
curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
63+
done
64+
deploy:
65+
needs: build
66+
if: github.event_name == 'release'
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v2
70+
- name: Setup .NET Core
71+
uses: actions/setup-dotnet@v1
72+
with:
73+
dotnet-version: 3.1.x
74+
- name: Create Release NuGet package
75+
run: |
76+
arrTag=(${GITHUB_REF//\// })
77+
VERSION="${arrTag[2]}"
78+
echo Version: $VERSION
79+
VERSION="${VERSION//v}"
80+
echo Clean Version: $VERSION
81+
dotnet pack -v normal -c Release --include-symbols --include-source -p:SymbolPackageFormat=snupkg -p:PackageVersion=$VERSION -o nupkg src/$PROJECT_NAME/$PROJECT_NAME.*proj
82+
- name: Push to GitHub Feed
83+
run: |
84+
for f in ./nupkg/*.nupkg
85+
do
86+
curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED
87+
done
88+
- name: Push to NuGet Feed
89+
if: ${{ env.NUGET_FEED }} != ''
90+
run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_FEED --skip-duplicate --api-key $NUGET_KEY

0 commit comments

Comments
 (0)