Skip to content

Commit

Permalink
Merge pull request #5244 from NipunaMadhushan/master
Browse files Browse the repository at this point in the history
Fix windows installer build in publish release
  • Loading branch information
NipunaMadhushan authored Mar 12, 2024
2 parents 67aabdf + 8e1f245 commit 02339d6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 13 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/daily-build-2201.6.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,24 +400,30 @@ 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:
name: Windows Installer ZIP
- 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
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/daily-build-2201.7.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,24 +400,30 @@ 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:
name: Windows Installer ZIP
- 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
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/daily-build-2201.8.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -410,19 +410,20 @@ 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:
name: Windows Installer ZIP
- 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
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -405,19 +405,20 @@ 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:
name: Windows Installer ZIP
- 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
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 02339d6

Please sign in to comment.