Skip to content

Commit

Permalink
Update build files
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Nov 12, 2020
1 parent 9c1890b commit dece7b2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
release:
types: released

env:
CI_REQ_DOTNET_SDK_VER: 5.0.100

jobs:
build:
name: Build
Expand All @@ -19,11 +22,9 @@ jobs:
with:
submodules: true

- name: Install .NET
shell: pwsh
run: |
Invoke-WebRequest https://dot.net/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1
./dotnet-install.ps1 -Channel 3.1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}}

# Build each tfm separately since building all requires too much disk space
- name: Build dnSpy (.NET Framework)
Expand All @@ -33,58 +34,58 @@ jobs:
$env:PATH = $msbuildPath + ';' + $env:PATH
.\build.ps1 netframework
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
Compress-Archive -Path dnSpy\dnSpy\bin\Release\net48\* -DestinationPath C:\builtfiles\dnSpy-net48.zip
Compress-Archive -Path dnSpy\dnSpy\bin\Release\net48\* -DestinationPath C:\builtfiles\dnSpy-netframework.zip
.\clean-all.cmd
- name: Build dnSpy (.NET Core x86)
- name: Build dnSpy (.NET x86)
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 net-x86
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
Compress-Archive -Path dnSpy\dnSpy\bin\Release\net5.0-windows\win-x86\publish\* -DestinationPath C:\builtfiles\dnSpy-netcore-win32.zip
Compress-Archive -Path dnSpy\dnSpy\bin\Release\net5.0-windows\win-x86\publish\* -DestinationPath C:\builtfiles\dnSpy-net-win32.zip
.\clean-all.cmd
- name: Build dnSpy (.NET Core x64)
- name: Build dnSpy (.NET x64)
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 net-x64
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
Compress-Archive -Path dnSpy\dnSpy\bin\Release\net5.0-windows\win-x64\publish\* -DestinationPath C:\builtfiles\dnSpy-netcore-win64.zip
Compress-Archive -Path dnSpy\dnSpy\bin\Release\net5.0-windows\win-x64\publish\* -DestinationPath C:\builtfiles\dnSpy-net-win64.zip
.\clean-all.cmd
- uses: actions/upload-artifact@v2
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
with:
name: dnSpy-net48
path: C:\builtfiles\dnSpy-net48.zip
name: dnSpy-netframework
path: C:\builtfiles\dnSpy-netframework.zip
if-no-files-found: error

- uses: actions/upload-artifact@v2
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
with:
name: dnSpy-netcore-win32
path: C:\builtfiles\dnSpy-netcore-win32.zip
name: dnSpy-net-win32
path: C:\builtfiles\dnSpy-net-win32.zip
if-no-files-found: error

- uses: actions/upload-artifact@v2
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
with:
name: dnSpy-netcore-win64
path: C:\builtfiles\dnSpy-netcore-win64.zip
name: dnSpy-net-win64
path: C:\builtfiles\dnSpy-net-win64.zip
if-no-files-found: error

# Create a new release: create a tag, then 'git push origin <tagname>', wait for it to build
- name: Create a new GitHub release if a new tag is pushed
uses: softprops/action-gh-release@b28d815 #@v1
with:
files: |
C:\builtfiles\dnSpy-net48.zip
C:\builtfiles\dnSpy-netcore-win32.zip
C:\builtfiles\dnSpy-netcore-win64.zip
C:\builtfiles\dnSpy-netframework.zip
C:\builtfiles\dnSpy-net-win32.zip
C:\builtfiles\dnSpy-net-win64.zip
body: |
If your antivirus software complains, it's a false positive and you should contact them. I can't fix their buggy software.
if: startsWith(github.ref, 'refs/tags/')
Expand Down
6 changes: 0 additions & 6 deletions global.json

This file was deleted.

0 comments on commit dece7b2

Please sign in to comment.