From 9a3d4acdb3e85300a18a73377489a53985fcc5b4 Mon Sep 17 00:00:00 2001 From: Ying Chen <2601502859@qq.com> Date: Mon, 19 Feb 2024 17:15:34 +0800 Subject: [PATCH] update msi release process --- .github/workflows/build_msi_installer.yml | 25 ++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml index e8c09b5bd19..2feaf69ff80 100644 --- a/.github/workflows/build_msi_installer.yml +++ b/.github/workflows/build_msi_installer.yml @@ -56,13 +56,6 @@ jobs: - name: Python Setup uses: "./.github/actions/step_create_python_environment" - - name: Setup and Install dev promptflow - if: ${{ github.event.inputs.version == null || github.event.inputs.version == '' }} - uses: "./.github/actions/step_sdk_setup" - with: - setupType: promptflow_with_extra - scriptPath: ${{ env.testWorkingDirectory }} - - name: Install stable promptflow if: ${{ github.event.inputs.version != null && github.event.inputs.version != '' }} run: | @@ -98,6 +91,24 @@ jobs: MSI_PRIVATE_VERSION: ${{ github.event.inputs.set_msi_private_version }} shell: pwsh + - name: Update promptflow package version when set msi private version + if: ${{ github.event.inputs.set_msi_private_version != null && github.event.inputs.set_msi_private_version != '' }} + run: | + $override_version = 'VERSION = "{0}"' -f $env:MSI_PRIVATE_VERSION + Write-Host "'$override_version' as version" + $override_version | Out-File -FilePath "./src/promptflow/promptflow/_version.py" -Encoding ASCII + shell: pwsh + env: + MSI_PRIVATE_VERSION: ${{ github.event.inputs.set_msi_private_version }} + + - name: Setup and Install dev promptflow + if: ${{ github.event.inputs.version == null || github.event.inputs.version == '' }} + uses: "./.github/actions/step_sdk_setup" + with: + setupType: promptflow_with_extra + scriptPath: ${{ env.testWorkingDirectory }} + + - name: Build Pyinstaller project working-directory: ${{ github.workspace }}/scripts/installer/windows/scripts run: |