Skip to content

Commit 1ec4ff6

Browse files
Merge pull request #1 from ShawnLaMountain/main
Initial Commit
2 parents ebbb3cc + fb7e8ae commit 1ec4ff6

16 files changed

Lines changed: 927 additions & 0 deletions

.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

.github/workflows/CD.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CD
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
TITLE: "A wrapper around 'System.Net.Http.HttpClient'"
9+
DESCRIPTION: "A wrapper around 'System.Net.Http.HttpClient' enhancing AutoRedirect and Cookies. Can be used in all application types."
10+
TAGS: "thunderdesign httpclient threading net"
11+
#FILE_NAME: ex: "ThunderDesign.Net-PCL.HttpClientService"
12+
FILE_NAME: "${{ github.event.repository.name }}"
13+
#REPOSITORY_NAME: ex: "ThunderDesign.Net-PCL.HttpClientService"
14+
REPOSITORY_NAME: ${{ github.event.repository.name }}
15+
#REPOSITORY_OWNER: ex: "ThunderDesign"
16+
REPOSITORY_OWNER: ${{ github.repository_owner }}
17+
#GITHUB_URL: ex: "https://github.com/ThunderDesign"
18+
GITHUB_URL: ${{ github.server_url }}/${{ github.repository_owner }}
19+
#REPOSITORY_URL: ex: "https://github.com/ThunderDesign/ThunderDesign.Net-PCL.HttpClientService"
20+
REPOSITORY_URL: ${{ github.server_url }}/${{ github.repository_owner }}/${{ github.event.repository.name }}
21+
22+
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
23+
24+
jobs:
25+
pack:
26+
27+
runs-on: [windows-latest]
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
33+
- name: Setup .NET 3.0
34+
uses: actions/setup-dotnet@v1
35+
with:
36+
dotnet-version: 3.0.x
37+
38+
- name: Setup MSBuild
39+
uses: microsoft/setup-msbuild@v1.1
40+
41+
- name: Setup NuGet
42+
uses: NuGet/setup-nuget@v1.0.5
43+
44+
- name: Restore NuGet packages.sln
45+
run: nuget restore ./src/${{ env.FILE_NAME}}.sln
46+
47+
- name: Create NuGet Package
48+
run: msbuild ./src/${{ env.FILE_NAME}}.sln -t:pack /p:VersionPrefix=${{ github.event.release.tag_name }} /p:Configuration=Release /p:Title="${{ env.TITLE }}" /p:Description="${{ env.DESCRIPTION }}" /p:PackageTags="${{ env.TAGS }}" /p:Authors=ThunderDesign /p:PackageProjectUrl=${{ env.GITHUB_URL }} /p:PackageLicenseExpression=MIT /p:RepositoryType=git /p:RepositoryUrl=${{ env.REPOSITORY_URL }} /p:PackageReleaseNotes="See ${{ env.REPOSITORY_URL }}/releases/tag/${{ github.event.release.tag_name }}" /p:PackageOutputPath=${{ env.PACKAGE_OUTPUT_DIRECTORY}}
49+
50+
- name: Archive NuGet Package
51+
uses: actions/upload-artifact@v2.3.1
52+
with:
53+
name: Package_${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}
54+
path: ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg
55+
56+
- name: Publish NuGet Package
57+
run: nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }}

.github/workflows/CI.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
env:
11+
#FILE_NAME: ex: "ThunderDesign.Net-PCL.HttpClientService"
12+
FILE_NAME: "${{ github.event.repository.name }}"
13+
14+
jobs:
15+
build:
16+
17+
runs-on: [windows-latest]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
23+
- name: Setup .NET 3.0
24+
uses: actions/setup-dotnet@v1
25+
with:
26+
dotnet-version: 3.0.x
27+
28+
- name: Setup MSBuild
29+
uses: microsoft/setup-msbuild@v1.1
30+
31+
- name: Setup NuGet
32+
uses: NuGet/setup-nuget@v1.0.5
33+
34+
- name: Restore NuGet packages
35+
run: nuget restore ./src/${{ env.FILE_NAME}}.sln
36+
37+
- name: Build Solution
38+
run: msbuild ./src/${{ env.FILE_NAME}}.sln /p:Configuration=Release
39+

0 commit comments

Comments
 (0)