-
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
housekeeping: Move Splat to GitHub actions
Fix a number of warnings
- Loading branch information
1 parent
a2cadff
commit 13775c5
Showing
57 changed files
with
400 additions
and
181 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,123 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
types: [opened, synchronize, reopened, closed] | ||
branches: [ main ] | ||
|
||
env: | ||
configuration: Release | ||
productNamespacePrefix: "Splat" | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
outputs: | ||
nbgv: ${{ steps.nbgv.outputs.SemVer2 }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.x | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
|
||
- name: NBGV | ||
id: nbgv | ||
uses: dotnet/nbgv@master | ||
with: | ||
setAllVars: true | ||
|
||
- name: Add MSBuild to PATH | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Build | ||
run: msbuild /t:restore,build,pack /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }} | ||
working-directory: src | ||
|
||
- name: Install Report Generator | ||
run: dotnet tool install --global dotnet-reportgenerator-globaltool | ||
|
||
- name: Run Unit Tests | ||
run: dotnet test --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput="../../artifacts/coverage/coverage.xml" /p:Include="[${{ env.productNamespacePrefix}}*]*" /p:Exclude="[${{ env.productNamespacePrefix}}*Tests.*]*" | ||
working-directory: src | ||
|
||
- name: Generate Coverage Report | ||
run: reportgenerator -reports:"coverage.*.xml" -targetdir:report-output | ||
working-directory: artifacts/coverage | ||
|
||
- name: Upload Code Coverage | ||
run: | | ||
npm install -g codecov | ||
codecov | ||
working-directory: artifacts/coverage | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Create NuGet Artifacts | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: nuget | ||
path: '**/*.nupkg' | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: contains(github.event.pull_request.labels.*.name, 'release') && github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download NuGet Packages | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: nuget | ||
|
||
- name: Save SignClient Configuration | ||
run: 'echo "$SIGN_CLIENT_CONFIG" > SignPackages.json' | ||
shell: bash | ||
env: | ||
SIGN_CLIENT_CONFIG: ${{secrets.SIGN_CLIENT_CONFIG}} | ||
|
||
- name: Sign NuGet Packages | ||
uses: glennawatson/signclient@v1 | ||
with: | ||
input-files: '**/*.nupkg' | ||
sign-client-secret: ${{ secrets.SIGN_CLIENT_SECRET }} | ||
sign-client-user: ${{ secrets.SIGN_CLIENT_USER_ID }} | ||
project-name: reactiveui | ||
description: reactiveui | ||
config-file: SignPackages.json | ||
|
||
- name: Changelog | ||
uses: glennawatson/ChangeLog@v1 | ||
id: changelog | ||
|
||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ needs.build.outputs.nbgv }} | ||
release_name: ${{ needs.build.outputs.nbgv }} | ||
body: | | ||
${{ steps.changelog.outputs.commitLog }} | ||
- name: NuGet Push | ||
env: | ||
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }} | ||
SOURCE_URL: https://api.nuget.org/v3/index.json | ||
run: | | ||
dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg | ||
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.