Skip to content

Commit

Permalink
Merge pull request #1 from ShawnLaMountain/main
Browse files Browse the repository at this point in the history
Initial Commit
  • Loading branch information
ShawnLaMountain authored Feb 17, 2022
2 parents ebbb3cc + fb7e8ae commit 1ec4ff6
Show file tree
Hide file tree
Showing 16 changed files with 927 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
57 changes: 57 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CD

on:
release:
types: [published]

env:
TITLE: "A wrapper around 'System.Net.Http.HttpClient'"
DESCRIPTION: "A wrapper around 'System.Net.Http.HttpClient' enhancing AutoRedirect and Cookies. Can be used in all application types."
TAGS: "thunderdesign httpclient threading net"
#FILE_NAME: ex: "ThunderDesign.Net-PCL.HttpClientService"
FILE_NAME: "${{ github.event.repository.name }}"
#REPOSITORY_NAME: ex: "ThunderDesign.Net-PCL.HttpClientService"
REPOSITORY_NAME: ${{ github.event.repository.name }}
#REPOSITORY_OWNER: ex: "ThunderDesign"
REPOSITORY_OWNER: ${{ github.repository_owner }}
#GITHUB_URL: ex: "https://github.com/ThunderDesign"
GITHUB_URL: ${{ github.server_url }}/${{ github.repository_owner }}
#REPOSITORY_URL: ex: "https://github.com/ThunderDesign/ThunderDesign.Net-PCL.HttpClientService"
REPOSITORY_URL: ${{ github.server_url }}/${{ github.repository_owner }}/${{ github.event.repository.name }}

PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output

jobs:
pack:

runs-on: [windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup .NET 3.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.x

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5

- name: Restore NuGet packages.sln
run: nuget restore ./src/${{ env.FILE_NAME}}.sln

- name: Create NuGet Package
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}}

- name: Archive NuGet Package
uses: actions/upload-artifact@v2.3.1
with:
name: Package_${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}
path: ${{ env.PACKAGE_OUTPUT_DIRECTORY}}\${{ env.FILE_NAME}}.${{ github.event.release.tag_name }}.nupkg

- name: Publish NuGet Package
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 }}
39 changes: 39 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
#FILE_NAME: ex: "ThunderDesign.Net-PCL.HttpClientService"
FILE_NAME: "${{ github.event.repository.name }}"

jobs:
build:

runs-on: [windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup .NET 3.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.x

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5

- name: Restore NuGet packages
run: nuget restore ./src/${{ env.FILE_NAME}}.sln

- name: Build Solution
run: msbuild ./src/${{ env.FILE_NAME}}.sln /p:Configuration=Release

Loading

0 comments on commit 1ec4ff6

Please sign in to comment.