-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from jbogard/net80
Updating to .NET 8
- Loading branch information
Showing
27 changed files
with
228 additions
and
217 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,36 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup dotnet 6.0 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '6.0.x' | ||
- name: Setup dotnet 8.0 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '8.0.100' | ||
- name: Setup required dependencies | ||
run: ./setup.ps1 | ||
shell: pwsh | ||
- name: Build and Test | ||
run: ./Build.ps1 | ||
shell: pwsh | ||
- name: Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: artifacts/**/* |
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,34 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: DevSkim | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '25 3 * * 0' | ||
|
||
jobs: | ||
lint: | ||
name: DevSkim | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run DevSkim scanner | ||
uses: microsoft/DevSkim-Action@v1 | ||
|
||
- name: Upload DevSkim scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: devskim-results.sarif |
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,36 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup dotnet 6.0 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '6.0.x' | ||
- name: Setup dotnet 8.0 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: '8.0.100' | ||
- name: Build and Test | ||
run: ./Build.ps1 | ||
shell: pwsh | ||
- name: Push to NuGet | ||
env: | ||
NUGET_URL: https://api.nuget.org/v3/index.json | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
run: ./Push.ps1 | ||
shell: pwsh | ||
- name: Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: artifacts/**/* |
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,36 @@ | ||
# https://github.com/actions/stale | ||
|
||
name: "Stale issue & PR handler" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 12 * * *" | ||
|
||
env: | ||
ISSUES_DAYS_BEFORE_CLOSE: 14 | ||
PR_DAYS_BEFORE_CLOSE: 14 | ||
ISSUES_DAYS_BEFORE_STALE: 60 | ||
PR_DAYS_BEFORE_STALE: 28 | ||
|
||
jobs: | ||
issues: | ||
name: "Close stale issues and PRs" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/[email protected]" | ||
with: | ||
stale-issue-label: "stale" | ||
stale-issue-message: "This issue is stale because it has been open ${{ env.ISSUES_DAYS_BEFORE_STALE }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.ISSUES_DAYS_BEFORE_CLOSE }} days." | ||
close-issue-message: 'This issue was closed because it has been stalled for ${{ env.ISSUES_DAYS_BEFORE_CLOSE }} days with no activity.' | ||
days-before-close: "${{ env.ISSUES_DAYS_BEFORE_CLOSE }}" | ||
days-before-stale: "${{ env.ISSUES_DAYS_BEFORE_STALE }}" | ||
exempt-issue-assignees: true | ||
exempt-issue-labels: 'awaiting-approval,work-in-progress,up-for-grabs' | ||
stale-pr-label: "stale" | ||
stale-pr-message: 'This PR is stale because it has been open ${{ env.PR_DAYS_BEFORE_STALE }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.PR_DAYS_BEFORE_CLOSE }} days.' | ||
close-pr-message: 'This PR was closed because it has been stalled for ${{ env.PR_DAYS_BEFORE_CLOSE }} days with no activity.' | ||
days-before-pr-close: "${{ env.PR_DAYS_BEFORE_CLOSE }}" | ||
days-before-pr-stale: "${{ env.PR_DAYS_BEFORE_STALE }}" | ||
exempt-all-pr-assignees: true | ||
exempt-pr-labels: 'awaiting-approval,work-in-progress' |
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 |
---|---|---|
|
@@ -12,6 +12,8 @@ TestResults | |
*.suo | ||
*.user | ||
*.sln.docstates | ||
.idea/ | ||
.DS_Store | ||
|
||
# Build results | ||
[Dd]ebug/ | ||
|
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,36 @@ | ||
# Taken from psake https://github.com/psake/psake | ||
|
||
<# | ||
.SYNOPSIS | ||
This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode | ||
to see if an error occcured. If an error is detected then an exception is thrown. | ||
This function allows you to run command-line programs without having to | ||
explicitly check the $lastexitcode variable. | ||
.EXAMPLE | ||
exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed" | ||
#> | ||
function Exec | ||
{ | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Position=0,Mandatory=1)][scriptblock]$cmd, | ||
[Parameter(Position=1,Mandatory=0)][string]$errorMessage = ($msgs.error_bad_command -f $cmd) | ||
) | ||
& $cmd | ||
if ($lastexitcode -ne 0) { | ||
throw ("Exec: " + $errorMessage) | ||
} | ||
} | ||
|
||
$artifacts = ".\artifacts" | ||
|
||
if(Test-Path $artifacts) { Remove-Item $artifacts -Force -Recurse } | ||
|
||
exec { & dotnet clean -c Release } | ||
|
||
exec { & dotnet build -c Release } | ||
|
||
exec { & dotnet test -c Release --no-build -l trx --verbosity=normal } | ||
|
||
exec { & dotnet pack .\src\BulkWriter\BulkWriter.csproj -c Release -o $artifacts --no-build } | ||
|
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 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,14 @@ | ||
$scriptName = $MyInvocation.MyCommand.Name | ||
$artifacts = "./artifacts" | ||
|
||
if ([string]::IsNullOrEmpty($Env:NUGET_API_KEY)) { | ||
Write-Host "${scriptName}: NUGET_API_KEY is empty or not set. Skipped pushing package(s)." | ||
} else { | ||
Get-ChildItem $artifacts -Filter "*.nupkg" | ForEach-Object { | ||
Write-Host "$($scriptName): Pushing $($_.Name)" | ||
dotnet nuget push $_ --source $Env:NUGET_URL --api-key $Env:NUGET_API_KEY | ||
if ($lastexitcode -ne 0) { | ||
throw ("Exec: " + $errorMessage) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.