|
| 1 | +# This workflow will build a .NET project |
| 2 | +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net |
| 3 | + |
| 4 | +name: Build |
| 5 | + |
| 6 | +on: |
| 7 | + workflow_dispatch: |
| 8 | + push: |
| 9 | + branches: |
| 10 | + - dev |
| 11 | + - master |
| 12 | + pull_request: |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + |
| 17 | + runs-on: windows-latest |
| 18 | + env: |
| 19 | + FlowVersion: 1.19.5 |
| 20 | + NUGET_CERT_REVOCATION_MODE: offline |
| 21 | + BUILD_NUMBER: ${{ github.run_number }} |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v4 |
| 24 | + - name: Set Flow.Launcher.csproj version |
| 25 | + id: update |
| 26 | + |
| 27 | + with: |
| 28 | + file: | |
| 29 | + "**/SolutionAssemblyInfo.cs" |
| 30 | + version: ${{ env.FlowVersion }}.${{ env.BUILD_NUMBER }} |
| 31 | + - name: Setup .NET |
| 32 | + uses: actions/setup-dotnet@v4 |
| 33 | + with: |
| 34 | + dotnet-version: 7.0.x |
| 35 | +# cache: true |
| 36 | +# cache-dependency-path: | |
| 37 | +# Flow.Launcher/packages.lock.json |
| 38 | +# Flow.Launcher.Core/packages.lock.json |
| 39 | +# Flow.Launcher.Infrastructure/packages.lock.json |
| 40 | +# Flow.Launcher.Plugin/packages.lock.json |
| 41 | + - name: Install vpk |
| 42 | + Install vpk tool (dotnet tool install will not reinstall if already installed) |
| 43 | + We will update the cli by removing cache |
| 44 | + run: | |
| 45 | + if (!(Get-Command vpk -ErrorAction SilentlyContinue)) { |
| 46 | + dotnet tool install -g vpk |
| 47 | + } |
| 48 | + - name: Restore dependencies |
| 49 | + run: dotnet restore --locked-mode |
| 50 | + - name: Build |
| 51 | + run: dotnet build --no-restore -c Release |
| 52 | + - name: Initialize Service |
| 53 | + run: | |
| 54 | + sc config WSearch start= auto # Starts Windows Search service- Needed for running ExplorerTest |
| 55 | + net start WSearch |
| 56 | + - name: Test |
| 57 | + run: dotnet test --no-build --verbosity normal -c Release |
| 58 | + - name: Perform post_build tasks |
| 59 | + shell: pwsh |
| 60 | + run: .\Scripts\post_build.ps1 -flowversion "${env:FlowVersion}-build.${env:BUILD_NUMBER}" |
| 61 | + - name: Upload Plugin Nupkg |
| 62 | + uses: actions/upload-artifact@v4 |
| 63 | + with: |
| 64 | + name: Plugin nupkg |
| 65 | + path: | |
| 66 | + Output\Release\Flow.Launcher.Plugin.*.nupkg |
| 67 | + compression-level: 0 |
| 68 | + - name: Upload Setup |
| 69 | + uses: actions/upload-artifact@v4 |
| 70 | + with: |
| 71 | + name: Flow Installer |
| 72 | + path: | |
| 73 | + Output\Packages\Flow-Launcher-*.exe |
| 74 | + compression-level: 0 |
| 75 | + - name: Upload Portable Version |
| 76 | + uses: actions/upload-artifact@v4 |
| 77 | + with: |
| 78 | + name: Portable Version |
| 79 | + path: | |
| 80 | + Output\Packages\Flow-Launcher-Portable.zip |
| 81 | + compression-level: 0 |
| 82 | + - name: Upload Full Nupkg |
| 83 | + uses: actions/upload-artifact@v4 |
| 84 | + with: |
| 85 | + name: Full nupkg |
| 86 | + path: | |
| 87 | + Output\Packages\FlowLauncher-*-full.nupkg |
| 88 | +
|
| 89 | + compression-level: 0 |
| 90 | + - name: Upload Release Information |
| 91 | + uses: actions/upload-artifact@v4 |
| 92 | + with: |
| 93 | + name: RELEASES |
| 94 | + path: | |
| 95 | + Output\Packages\RELEASES |
| 96 | + compression-level: 0 |
0 commit comments