Builder main installer #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Builder main installer | |
on: | |
workflow_dispatch: | |
env: | |
SRC_PATH: ${{ github.workspace }}/src | |
INSTALLER_SCRIPT_PATH: ${{ github.workspace }}/src/bin/installer/bin | |
FULL_INSTALLER_PATH: ${{ github.workspace }}/src/bin/installer/iss/full | |
LITE_INSTALLER_PATH: ${{ github.workspace }}/src/bin/installer/iss/lite | |
jobs: | |
build-job: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.SRC_PATH }} | |
- name: Install Python packages | |
run: pip install py7zr pefile colorama | |
- name: Unpack tools | |
working-directory: ${{ env.INSTALLER_SCRIPT_PATH }} | |
run: python unpack-project.py -f ${{ env.SRC_PATH }}/toolkit | |
- name: Build documents | |
working-directory: ${{ env.INSTALLER_SCRIPT_PATH }} | |
run: ./build-docs.bat | |
- name: Update full installer .iss config paths | |
working-directory: ${{ env.FULL_INSTALLER_PATH }} | |
shell: bash | |
run: | | |
WORKSPACE_BUILD_PATH=$(echo "${{ github.workspace }}" | tr '\\' '/') | |
WORKSPACE_SRC_PATH=$(echo "${{ env.SRC_PATH }}" | tr '\\' '/') | |
sed -i "s|C:\\\\code\\\\toolkit|$WORKSPACE_SRC_PATH|g" setup.iss | |
sed -i "s|C:\\\\code|$WORKSPACE_BUILD_PATH|g" setup.iss | |
- name: Update version number in full installer .iss | |
working-directory: ${{ env.FULL_INSTALLER_PATH }} | |
shell: bash | |
run: | | |
VERSION_CODE=$(date +'%Y.%m') | |
sed -i 's/RELEASE/'"$VERSION_CODE"'/g' setup.iss | |
- name: Build full installer | |
working-directory: ${{ env.FULL_INSTALLER_PATH }} | |
run: ISCC.exe setup.iss /DMySrcDir="${{ env.SRC_PATH }}" /DMyOutputDir="${{ github.workspace }}" | |
- name: Update lite installer .iss config paths | |
working-directory: ${{ env.LITE_INSTALLER_PATH }} | |
shell: bash | |
run: | | |
WORKSPACE_BUILD_PATH=$(echo "${{ github.workspace }}" | tr '\\' '/') | |
WORKSPACE_SRC_PATH=$(echo "${{ env.SRC_PATH }}" | tr '\\' '/') | |
sed -i "s|C:\\\\code\\\\toolkit|$WORKSPACE_SRC_PATH|g" setup.iss | |
sed -i "s|C:\\\\code|$WORKSPACE_BUILD_PATH|g" setup.iss | |
- name: Update version number in lite installer .iss | |
working-directory: ${{ env.LITE_INSTALLER_PATH }} | |
shell: bash | |
run: | | |
VERSION_CODE=$(date +'%Y.%m') | |
sed -i 's/RELEASE/'"$VERSION_CODE"'/g' setup.iss | |
- name: Build lite installer | |
working-directory: ${{ env.LITE_INSTALLER_PATH }} | |
run: ISCC.exe setup.iss /DMySrcDir="${{ env.SRC_PATH }}" /DMyOutputDir="${{ github.workspace }}" | |
- name: Generate checksums report | |
working-directory: ${{ env.INSTALLER_SCRIPT_PATH }} | |
run: | | |
Set-ExecutionPolicy Bypass -Scope Process -Force | |
.\generate-checksums.ps1 -Directory "${{ env.SRC_PATH }}/toolkit" -OutputFile "${{ env.SRC_PATH }}/tools_checksums.txt" | |
- name: Upload Setup as Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: setup-installer-artifact | |
path: | | |
./*.exe | |
${{ env.SRC_PATH }}/tools_checksums.txt |