Skip to content

Commit

Permalink
Add build_msi flag, build nuget on regular build only. (#2204)
Browse files Browse the repository at this point in the history
* Add build_msi flag, build nuget on regular only

* Embed artifact name in output name

* env vars
  • Loading branch information
gtrevi committed Mar 20, 2023
1 parent b72f1ac commit 0f773e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
with:
build_artifact: Build-x64
generate_release_package: true
build_msi: true
build_nuget: true
build_options: /p:ReleaseJIT='True'

Expand All @@ -52,8 +53,6 @@ jobs:
uses: ./.github/workflows/reusable-build.yml
with:
build_artifact: Build-x64-native-only
generate_release_package: true
build_nuget: true
build_options: /p:DisableJIT='True' /p:DisableInterpreter='True'

cmake:
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ on:
build_codeql:
required: false
type: boolean
build_msi:
required: false
type: boolean
build_nuget:
required: false
type: boolean
Expand Down Expand Up @@ -189,29 +192,29 @@ jobs:
retention-days: 5

- name: Upload the MSI package (Debug)
if: inputs.build_artifact == 'Build-x64' && matrix.configurations == 'Debug'
if: inputs.build_msi == true && matrix.configurations == 'Debug'
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ebpf-for-windows MSI installer (Debug)
name: ebpf-for-windows - MSI installer (${{inputs.build_artifact}}_${{env.BUILD_CONFIGURATION}})
path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/ebpf-for-windows.msi

- name: Upload the MSI package (Release)
if: inputs.build_artifact == 'Build-x64' && matrix.configurations == 'Release'
if: inputs.build_msi == true && matrix.configurations == 'Release'
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ebpf-for-windows MSI installer (Release)
name: ebpf-for-windows - MSI installer (${{inputs.build_artifact}}_${{env.BUILD_CONFIGURATION}})
path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/ebpf-for-windows.msi

- name: Build nuget package
if: matrix.configurations == 'Release' && inputs.build_nuget == true && steps.skip_check.outputs.should_skip != 'true'
- name: Build the NuGet package
if: inputs.build_nuget == true && matrix.configurations == 'Release' && steps.skip_check.outputs.should_skip != 'true'
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.SOLUTION_FILE_PATH}} ${{env.BUILD_OPTIONS}} /t:tools\nuget

- name: Upload the nuget package
if: matrix.configurations == 'Release' && inputs.build_nuget == true && steps.skip_check.outputs.should_skip != 'true'
- name: Upload the NuGet package
if: inputs.build_nuget == true && matrix.configurations == 'Release' && steps.skip_check.outputs.should_skip != 'true'
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ebpf-for-windows nuget
name: ebpf-for-windows - NuGet package (${{inputs.build_artifact}}_${{env.BUILD_CONFIGURATION}})
path: ${{github.workspace}}/${{env.BUILD_PLATFORM}}/${{env.BUILD_CONFIGURATION}}/*.nupkg

- name: Perform CodeQL Analysis
Expand Down
2 changes: 1 addition & 1 deletion docs/ReleaseProcess.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ eBPF for Windows:
1. Commit all the changes in the release branch into your forked repo.
1. Create a **Draft** pull-request for the release branch into the main `ebpf-for-windows` repo, and title the PR as *"Release v`X.Y.Z`"* (replace "`X.Y.Z`" with the version number being released).
1. Once the CI/CD pipeline for the PR completes, download the
"`ebpf-for-windows MSI installer (Release)`" and "`ebpf-for-windows nuget`" build artifacts
"`ebpf-for-windows - MSI installer (Build-x64_Release)`" and "`ebpf-for-windows - NuGet package (Build-x64_Release)`" build artifacts
(accessible via the "`Actions`" tab on GitHub).
1. Extract the `*.msi` and `*.nupkg` files, respectively, out of them, and rename them in the following format (replace "`X.Y.Z`" with the version number being released):

Expand Down

0 comments on commit 0f773e1

Please sign in to comment.