diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1bab3d08b..fbe66f7f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,9 @@ on: release: types: released +env: + CI_REQ_DOTNET_SDK_VER: 5.0.100 + jobs: build: name: Build @@ -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) @@ -33,48 +34,48 @@ 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 ', wait for it to build @@ -82,9 +83,9 @@ jobs: 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/') diff --git a/global.json b/global.json deleted file mode 100644 index 208bc74fb..000000000 --- a/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sdk": { - "version": "5.0.100", - "rollForward": "latestMinor" - } -}