diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e137d464e..18edddee2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,49 +1,26 @@ -name: GitHub CI +name: .NET Core build + on: push: - branches: - - master + branches: [ "master" ] pull_request: - branches: - - master - release: - types: released + branches: [ "master" ] jobs: build: - name: Build - runs-on: windows-latest + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - - 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 - - - uses: actions/upload-artifact@v1 - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - with: - name: de4dot-net35 - path: Release/net35 - - - uses: actions/upload-artifact@v1 - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - with: - name: de4dot-net45 - path: Release/net45 - - - uses: actions/upload-artifact@v1 - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - with: - name: de4dot-netcoreapp2.1 - path: publish-netcoreapp2.1 - - - uses: actions/upload-artifact@v1 - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - with: - name: de4dot-netcoreapp3.1 - path: publish-netcoreapp3.1 + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Restore dependencies + run: dotnet restore ./de4dot.netcore.sln + - name: Build + run: dotnet build --no-restore -c Release ./de4dot.netcore.sln + - uses: actions/upload-artifact@main + with: + name: de4dot-net7.0 + path: Release/net7.0