Check overlaps #217
Workflow file for this run
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
name: GitHub CI | |
on: | |
push: | |
paths: | |
- '.github/workflows/**' | |
- 'Examples/**' | |
- 'src/**' | |
- '!**/*.md' | |
branches: | |
- master | |
pull_request: | |
paths: | |
- 'Examples/**' | |
- 'src/**' | |
- '!**/*.md' | |
branches: | |
- master | |
release: | |
types: released | |
env: | |
CI_REQ_DOTNET_SDK_VER: 6.0.100 | |
jobs: | |
build-windows: | |
name: Build (Windows) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}} | |
- name: Build | |
shell: pwsh | |
run: | | |
$msbuildPath = Split-Path (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\Current\Bin\amd64\MSBuild.exe | Select-Object -First 1) -Parent | |
$env:PATH = $msbuildPath + ';' + $env:PATH | |
.\build.ps1 | |
- name: upload-artifact doesn't support wildcards | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | |
shell: pwsh | |
run: | | |
New-Item -ItemType Directory nuget_files > $null | |
Copy-Item src\bin\Release\*.*nupkg nuget_files | |
- uses: actions/upload-artifact@v2 | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | |
with: | |
name: nupkg | |
path: nuget_files | |
if-no-files-found: error | |
- name: Upload to nuget.org if it's a new release | |
if: startsWith(github.ref, 'refs/tags/') | |
shell: pwsh | |
run: | | |
Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -UseBasicParsing -OutFile nuget.exe | |
Get-ChildItem src\bin\Release\dnlib.*.nupkg | ForEach-Object { .\nuget.exe push $_.FullName -ApiKey ${{secrets.NUGET_APIKEY}} -NonInteractive -Source https://api.nuget.org/v3/index.json } | |
# Make sure it builds on Linux too | |
build-ubuntu: | |
name: Build (Ubuntu) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}} | |
- name: Build | |
shell: pwsh | |
run: ./build.ps1 |