-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes an issue where a failure to establish initial stream parsing co…
…uld hang
- Loading branch information
Showing
5 changed files
with
154 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
branches: | ||
- "**" | ||
|
||
env: | ||
DOTNETVERSION: "5.0.x" | ||
APP: "HarmonyHub" | ||
SOLUTION: "./src/HarmonyHub.sln" | ||
BUILDOUTPUTPATH: "./src/HarmonyHub/bin/Release/netstandard2.0" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup .NET Core SDK ${{ env.DOTNETVERSION }} | ||
uses: actions/setup-dotnet@v1.7.2 | ||
with: | ||
dotnet-version: ${{ env.DOTNETVERSION }} | ||
|
||
- name: Install dependencies | ||
run: dotnet restore ${{ env.SOLUTION }} | ||
|
||
- name: Build | ||
run: dotnet build ${{ env.SOLUTION }} --configuration Release --no-restore | ||
|
||
- name: Upload app build artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.APP }} | ||
path: ${{ env.BUILDOUTPUTPATH }} | ||
|
||
- name: Test | ||
run: dotnet test ${{ env.SOLUTION }} --no-restore --verbosity normal --logger trx --results-directory "TestResults" | ||
|
||
- name: Upload TestResults build artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: TestResults | ||
path: TestResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: release | ||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+.[0-9]+" | ||
|
||
env: | ||
DOTNETVERSION: "5.0.x" | ||
APP: "HarmonyHub" | ||
SOLUTION: "./src/HarmonyHub.sln" | ||
BUILDOUTPUTPATH: "./src/HarmonyHub/bin/Release/netstandard2.0" | ||
PACKOUTPUTPATH: "./out" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
fetch-depth: 0 | ||
|
||
- name: Setup .NET Core SDK ${{ env.DOTNETVERSION }} | ||
uses: actions/setup-dotnet@v1.7.2 | ||
with: | ||
dotnet-version: ${{ env.DOTNETVERSION }} | ||
|
||
- name: Get version | ||
id: version | ||
uses: battila7/get-version-action@v2 | ||
|
||
- name: Get previous release tag | ||
id: previousTag | ||
uses: sammcoe/get-previous-release-action@v1.0.3 | ||
|
||
- name: Install dependencies | ||
run: dotnet restore ${{ env.SOLUTION }} | ||
|
||
- name: Build | ||
run: dotnet build ${{ env.SOLUTION }} --configuration Release --no-restore /p:Version=${{ steps.version.outputs.version-without-v }} | ||
|
||
- name: Test | ||
run: dotnet test ${{ env.SOLUTION }} --no-restore --verbosity normal --logger trx --results-directory "TestResults" | ||
|
||
- name: Upload app build artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.APP }}-${{ steps.version.outputs.version-without-v }} | ||
path: ${{ env.BUILDOUTPUTPATH }} | ||
|
||
- name: Upload TestResults build artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: TestResults | ||
path: TestResults | ||
|
||
- name: Build changelog | ||
id: gitLog | ||
uses: jarrodparkes/git-log-action@1.0.0 | ||
with: | ||
start: ${{ steps.previousTag.outputs.tag }} | ||
end: ${{ github.ref }} | ||
|
||
- name: GitHub release | ||
uses: actions/create-release@v1 | ||
id: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release_name: ${{ steps.version.outputs.version-without-v }} | ||
tag_name: ${{ github.ref }} | ||
body: ${{ env.LOG }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: ZIP release artifact | ||
run: zip -r ${{ env.APP }}-${{ steps.version.outputs.version-without-v }}.zip ${{ env.BUILDOUTPUTPATH }} | ||
|
||
- name: GitHub release assets | ||
uses: actions/upload-release-asset@v1 | ||
id: release_assets | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: ${{ env.APP }}-${{ steps.version.outputs.version-without-v }}.zip | ||
asset_name: ${{ env.APP }}-${{ steps.version.outputs.version-without-v }}.zip | ||
asset_content_type: application/zip | ||
|
||
- name: NuGet pack | ||
run: dotnet pack ${{ env.SOLUTION }} --configuration Release --no-restore --include-symbols /p:Version=${{ steps.version.outputs.version-without-v }} -o ${{ env.PACKOUTPUTPATH }} | ||
|
||
- name: Upload NuGet build artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.APP }} NuGet Packages | ||
path: ${{ env.PACKOUTPUTPATH }} | ||
|
||
- name: NuGet push | ||
run: dotnet nuget push "./${{ env.PACKOUTPUTPATH }}/*.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters