Skip to content

Actually Fixed: Out of Bounds Potential Read on Pattern Not Found in … #80

Actually Fixed: Out of Bounds Potential Read on Pattern Not Found in …

Actually Fixed: Out of Bounds Potential Read on Pattern Not Found in … #80

name: Build and Publish
on:
push:
branches: [ master ]
tags:
- '*'
pull_request:
branches: [ master ]
workflow_dispatch:
env:
CHANGELOG_PATH: ./Changelog.md
CODE_COVERAGE_PATH: ./Coverage.xml
CODE_COVERAGE_OUTPUT_PATH: ./Coverage.net6.0.xml
SOLUTION_PATH: ./Reloaded.Memory.Sigscan.sln
NUPKG_GLOB: ./Reloaded.Memory.SigScan/bin/Release/*.nupkg
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') }}
RELEASE_TAG: ${{ github.ref_name }}
jobs:
build:
runs-on: windows-2022
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core SDK (3.1.x)
uses: actions/[email protected]
with:
# Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x
dotnet-version: 3.1.x
- name: Setup .NET Core SDK (7.0.x)
uses: actions/setup-dotnet@v3
with:
# Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x
dotnet-version: 7.0.x
# Required for C#10 features.
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Setup AutoChangelog
run: npm install -g auto-changelog
- name: Get Dotnet Info
run: dotnet --info
- name: Build
run: dotnet build -c Release "$env:SOLUTION_PATH"
- name: Test
run: |
dotnet test $env:SOLUTION_PATH /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="../$env:CODE_COVERAGE_PATH" --% /p:Exclude=\"[xunit.*]*\"
- name: Codecov
# You may pin to the exact commit or the version.
# uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b
uses: codecov/[email protected]
with:
# Comma-separated list of files to upload
files: ${{ env.CODE_COVERAGE_OUTPUT_PATH }}
- name: Create Changelog (on Tag)
run: |
if ($env:IS_RELEASE -eq 'true')
{
auto-changelog --sort-commits date --hide-credit --template keepachangelog --commit-limit false --unreleased --starting-version "$env:RELEASE_TAG" --output "$env:CHANGELOG_PATH"
}
else
{
auto-changelog --sort-commits date --hide-credit --template keepachangelog --commit-limit false --unreleased --output "$env:CHANGELOG_PATH"
}
- name: Upload NuGet Package Artifact
uses: actions/[email protected]
with:
# Artifact name
name: NuGet Packages
# A file, directory or wildcard pattern that describes what to upload
path: |
${{ env.NUPKG_GLOB }}
- name: Upload Changelog Artifact
uses: actions/[email protected]
with:
# Artifact name
name: Changelog
# A file, directory or wildcard pattern that describes what to upload
path: ${{ env.CHANGELOG_PATH }}
retention-days: 0
- name: Upload to GitHub Releases
uses: softprops/[email protected]
if: env.IS_RELEASE == 'true'
with:
# Path to load note-worthy description of changes in release from
body_path: ${{ env.CHANGELOG_PATH }}
# Newline-delimited list of path globs for asset files to upload
files: |
${{ env.NUPKG_GLOB }}
${{ env.CHANGELOG_PATH }}
- name: Upload to NuGet (on Tag)
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
if: env.IS_RELEASE == 'true'
run: |
$items = Get-ChildItem -Path "./*.nupkg" -Recurse
Foreach ($item in $items)
{
Write-Host "Pushing $item"
dotnet nuget push "$item" -k "$env:NUGET_KEY" -s "https://api.nuget.org/v3/index.json" --skip-duplicate
}