From 58316a21c6b67edbd429a0564551a54c1e7d0487 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Mon, 11 Mar 2024 17:01:54 +0530 Subject: [PATCH 1/2] Fix windows installer generation --- .github/workflows/publish-release.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 13dc08c925..f0bc814a32 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -528,7 +528,7 @@ jobs: run: sudo installer -pkg installers/mac/target/pkg/ballerina-*-macos-x64.pkg -target / - name: Update Installer Test Configs run: | - DISPLAY_TEXT=${{ needs.ubuntu-build.outputs.lang-version }} + DISPLAY_TEXT=${{ needs.publish-release.outputs.lang-version }} SWAN_LAKE_LATEST_VERSION="swan-lake-"+$DISPLAY_TEXT perl -pi -e "s/^\s*swan-lake-latest-version-display-text=.*/swan-lake-latest-version-display-text=$DISPLAY_TEXT/" ballerina-test-automation/gradle.properties perl -pi -e "s/^\s*swan-lake-latest-version=.*/swan-lake-latest-version=$SWAN_LAKE_LATEST_VERSION/" ballerina-test-automation/gradle.properties @@ -610,21 +610,22 @@ jobs: dotnet-version: '2.1.x' - name: Install GUID Generator run: dotnet tool install -g dotnet-guid --version 0.5.2 + - name: Set up Wix toolkit + run: echo "${WIX}bin" >> $GITHUB_PATH + shell: bash + - name: Set cosign-installer + uses: sigstore/cosign-installer@v3.0.3 - name: Download Windows Installer Zip run: | echo default login ${{ secrets.BALLERINA_BOT_USERNAME }} password ${{ secrets.BALLERINA_BOT_TOKEN }} >> _netrc curl --netrc-file _netrc -L -o ballerina-${{ needs.publish-release.outputs.project-version }}-windows.zip https://github.com/ballerina-platform/ballerina-distribution/releases/download/v${{ needs.publish-release.outputs.release-version }}/ballerina-${{ needs.publish-release.outputs.project-version }}-windows.zip - - name: cosign-installer - uses: sigstore/cosign-installer@v3.0.3 - name: Create windows-msi Installer id: run_installers_msi run: | - $env:Path += ";C:\Program Files (x86)\WiX Toolset v3.11\bin" move installers\windows .\ ren windows w cd w .\build-ballerina-windows-x64.bat --version ${{ needs.publish-release.outputs.project-version }} --path .\..\ - echo "Created windows-msi successfully" - name: Sign the Windows installer run: | cosign sign-blob w\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi --output-certificate ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.pem --output-signature ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.sig --yes From 8e1f245ad5708fa6fab440e0595976dcf1413576 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Mon, 11 Mar 2024 17:07:06 +0530 Subject: [PATCH 2/2] Fix windows installer generation --- .github/workflows/daily-build-2201.6.x.yml | 10 ++++++++-- .github/workflows/daily-build-2201.7.x.yml | 10 ++++++++-- .github/workflows/daily-build-2201.8.x.yml | 5 +++-- .github/workflows/daily-build.yml | 5 +++-- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/daily-build-2201.6.x.yml b/.github/workflows/daily-build-2201.6.x.yml index 049c963e2f..69a0d751e9 100644 --- a/.github/workflows/daily-build-2201.6.x.yml +++ b/.github/workflows/daily-build-2201.6.x.yml @@ -400,11 +400,19 @@ jobs: uses: actions/checkout@v2 with: ref: 2201.6.x + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '11' - uses: actions/setup-dotnet@v1 with: dotnet-version: '2.1.x' - name: Install GUID Generator run: dotnet tool install -g dotnet-guid --version 0.5.2 + - name: Set up Wix toolkit + run: echo "${WIX}bin" >> $GITHUB_PATH + shell: bash - name: Download Windows Intaller Zip uses: actions/download-artifact@v2 with: @@ -412,12 +420,10 @@ jobs: - name: Create windows-msi id: run_installers_msi run: | - $env:Path += ";C:\Program Files (x86)\WiX Toolset v3.11\bin" move installers\windows .\ ren windows w cd w .\build-ballerina-windows-x64.bat --version ${{ needs.ubuntu-build.outputs.project-version }} --path .\..\ - echo "Created windows-msi successfully" - name: Generate Hashes run: | openssl dgst -sha256 -out ballerina-${{ needs.ubuntu-build.outputs.project-version }}-windows-x64.msi.sha256 w\target\msi\ballerina-*-windows-x64.msi diff --git a/.github/workflows/daily-build-2201.7.x.yml b/.github/workflows/daily-build-2201.7.x.yml index 91f52dcc61..f66c3474df 100644 --- a/.github/workflows/daily-build-2201.7.x.yml +++ b/.github/workflows/daily-build-2201.7.x.yml @@ -400,11 +400,19 @@ jobs: uses: actions/checkout@v2 with: ref: 2201.7.x + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '11' - uses: actions/setup-dotnet@v1 with: dotnet-version: '2.1.x' - name: Install GUID Generator run: dotnet tool install -g dotnet-guid --version 0.5.2 + - name: Set up Wix toolkit + run: echo "${WIX}bin" >> $GITHUB_PATH + shell: bash - name: Download Windows Intaller Zip uses: actions/download-artifact@v2 with: @@ -412,12 +420,10 @@ jobs: - name: Create windows-msi id: run_installers_msi run: | - $env:Path += ";C:\Program Files (x86)\WiX Toolset v3.11\bin" move installers\windows .\ ren windows w cd w .\build-ballerina-windows-x64.bat --version ${{ needs.ubuntu-build.outputs.project-version }} --path .\..\ - echo "Created windows-msi successfully" - name: Generate Hashes run: | openssl dgst -sha256 -out ballerina-${{ needs.ubuntu-build.outputs.project-version }}-windows-x64.msi.sha256 w\target\msi\ballerina-*-windows-x64.msi diff --git a/.github/workflows/daily-build-2201.8.x.yml b/.github/workflows/daily-build-2201.8.x.yml index 01cd5ed5c4..cfda4ce2b2 100644 --- a/.github/workflows/daily-build-2201.8.x.yml +++ b/.github/workflows/daily-build-2201.8.x.yml @@ -410,6 +410,9 @@ jobs: dotnet-version: '2.1.x' - name: Install GUID Generator run: dotnet tool install -g dotnet-guid --version 0.5.2 + - name: Set up Wix toolkit + run: echo "${WIX}bin" >> $GITHUB_PATH + shell: bash - name: Download Windows Intaller Zip uses: actions/download-artifact@v2 with: @@ -417,12 +420,10 @@ jobs: - name: Create windows-msi id: run_installers_msi run: | - $env:Path += ";C:\Program Files (x86)\WiX Toolset v3.11\bin" move installers\windows .\ ren windows w cd w .\build-ballerina-windows-x64.bat --version ${{ needs.ubuntu-build.outputs.project-version }} --path .\..\ - echo "Created windows-msi successfully" - name: Generate Hashes run: | openssl dgst -sha256 -out ballerina-${{ needs.ubuntu-build.outputs.project-version }}-windows-x64.msi.sha256 w\target\msi\ballerina-*-windows-x64.msi diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index 38c4b52179..b853e7e10f 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -405,6 +405,9 @@ jobs: dotnet-version: '2.1.x' - name: Install GUID Generator run: dotnet tool install -g dotnet-guid --version 0.5.2 + - name: Set up Wix toolkit + run: echo "${WIX}bin" >> $GITHUB_PATH + shell: bash - name: Download Windows Intaller Zip uses: actions/download-artifact@v2 with: @@ -412,12 +415,10 @@ jobs: - name: Create windows-msi id: run_installers_msi run: | - $env:Path += ";C:\Program Files (x86)\WiX Toolset v3.11\bin" move installers\windows .\ ren windows w cd w .\build-ballerina-windows-x64.bat --version ${{ needs.ubuntu-build.outputs.project-version }} --path .\..\ - echo "Created windows-msi successfully" - name: Generate Hashes run: | openssl dgst -sha256 -out ballerina-${{ needs.ubuntu-build.outputs.project-version }}-windows-x64.msi.sha256 w\target\msi\ballerina-*-windows-x64.msi