Skip to content

Commit

Permalink
Merge pull request #5885 from NipunaMadhushan/fix-windows-installer-j…
Browse files Browse the repository at this point in the history
…ava21

Fix windows installer build
  • Loading branch information
NipunaMadhushan authored Dec 11, 2024
2 parents a3d09f9 + 57890d3 commit 98299ec
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,20 +462,19 @@ jobs:
- name: Set up Wix toolkit
run: echo "${WIX}bin" >> $GITHUB_PATH
shell: bash
- name: Download Windows Intaller Zip
- name: Download Windows Installer Zip
uses: actions/download-artifact@v4
with:
name: Windows Installer ZIP
- name: Create windows-msi
id: run_installers_msi
run: |
move installers\windows .\
ren windows w
cd w
.\build-ballerina-windows-x64.bat --version ${{ needs.ubuntu-build.outputs.project-version }} --path .\..\
move installers\windows .\..\..\
cd ..\..\windows
.\build-ballerina-windows-x64.bat --version ${{ needs.ubuntu-build.outputs.project-version }} --path .\..\ballerina-distribution\ballerina-distribution
- 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
openssl dgst -sha256 -out ballerina-${{ needs.ubuntu-build.outputs.project-version }}-windows-x64.msi.sha256 D:\a\windows\target\msi\ballerina-*-windows-x64.msi
- name: Archive Windows msi Hashes
uses: actions/upload-artifact@v4
with:
Expand All @@ -485,9 +484,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Windows Installer msi
path: w\target\msi\ballerina-*-windows-x64.msi
path: D:\a\windows\target\msi\ballerina-*-windows-x64.msi
- name: Install Ballerina msi
run: msiexec /i w\target\msi\ballerina-${{ needs.ubuntu-build.outputs.project-version }}-windows-x64.msi /quiet /qr
run: msiexec /i D:\a\windows\target\msi\ballerina-${{ needs.ubuntu-build.outputs.project-version }}-windows-x64.msi /quiet /qr
shell: cmd
- name: Update Installer Test Configs
run: |
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -719,19 +719,18 @@ jobs:
- name: Create windows-msi Installer
id: run_installers_msi
run: |
move installers\windows .\
ren windows w
cd w
.\build-ballerina-windows-x64.bat --version ${{ needs.publish-release.outputs.project-version }} --path .\..\
move installers\windows .\..\..\
cd ..\..\windows
.\build-ballerina-windows-x64.bat --version ${{ needs.publish-release.outputs.project-version }} --path .\..\ballerina-distribution\ballerina-distribution
- 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
cosign sign-blob D:\a\windows\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
- name: Verify the Windows installer
run: |
cosign verify-blob w\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi --certificate ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.pem --signature ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.sig --certificate-identity=https://github.com/ballerina-platform/ballerina-distribution/.github/workflows/publish-release.yml@${{ github.ref }} --certificate-oidc-issuer=https://token.actions.githubusercontent.com
cosign verify-blob D:\a\windows\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi --certificate ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.pem --signature ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.sig --certificate-identity=https://github.com/ballerina-platform/ballerina-distribution/.github/workflows/publish-release.yml@${{ github.ref }} --certificate-oidc-issuer=https://token.actions.githubusercontent.com
- name: Generate Hashes
run: |
openssl dgst -sha256 -out ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.sha256 w\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi
openssl dgst -sha256 -out ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.sha256 D:\a\windows\target\msi\ballerina-*-windows-x64.msi
- name: Upload Windows msi Hashes
uses: actions/upload-release-asset@v1
env:
Expand All @@ -748,7 +747,7 @@ jobs:
with:
upload_url: ${{ needs.publish-release.outputs.upload-asset-url }}
asset_name: ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi
asset_path: w\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi
asset_path: D:\a\windows\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi
asset_content_type: application/octet-stream
- name: Upload Windows installer's Certificate
uses: actions/upload-release-asset@v1
Expand All @@ -769,7 +768,7 @@ jobs:
asset_path: ./ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.sig
asset_content_type: application/octet-stream
- name: Install Ballerina msi
run: msiexec /i w\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi /quiet /qr
run: msiexec /i D:\a\windows\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi /quiet /qr
shell: cmd
- name: Update Installer Test Configs
run: |
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/publish_release_bi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,12 @@ jobs:
- name: Create windows-msi Installer
id: run_installers_msi
run: |
move installers\windows .\
ren windows w
cd w
.\build-ballerina-windows-x64.bat --version ${{ needs.publish-release.outputs.project-version }} --path .\..\
move installers\windows .\..\..\
cd ..\..\windows
.\build-ballerina-windows-x64.bat --version ${{ needs.publish-release.outputs.project-version }} --path .\..\ballerina-distribution\ballerina-distribution
- name: Generate Hashes
run: |
openssl dgst -sha256 -out ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.sha256 w\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi
openssl dgst -sha256 -out ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi.sha256 D:\a\windows\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi
- name: Upload Windows msi Hashes
uses: actions/upload-release-asset@v1
env:
Expand All @@ -484,7 +483,7 @@ jobs:
with:
upload_url: ${{ needs.publish-release.outputs.upload-asset-url }}
asset_name: ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi
asset_path: w\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi
asset_path: D:\a\windows\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi
asset_content_type: application/octet-stream
# - name: Install Ballerina msi
# run: msiexec /i w\target\msi\ballerina-${{ needs.publish-release.outputs.project-version }}-windows-x64.msi /quiet /qr
Expand Down

0 comments on commit 98299ec

Please sign in to comment.