Multi-Platform Build Develop #554
This file contains hidden or 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: Multi-Platform Build Develop | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| platform: | |
| description: "Choose a platform" | |
| required: true | |
| type: choice | |
| options: | |
| - windows | |
| - darwin | |
| - linux | |
| - mwl | |
| - uos | |
| legacy: | |
| description: "Legacy system version" | |
| required: false | |
| type: boolean | |
| default: false | |
| version: | |
| description: "Select version type" | |
| required: true | |
| type: choice | |
| default: ce | |
| options: | |
| - ce | |
| - ee | |
| - se | |
| - irify | |
| - irifyee | |
| - memfit | |
| engine: | |
| description: "Is there a built-in engine" | |
| required: false | |
| type: boolean | |
| default: false | |
| engineVersion: | |
| description: "Specify engine version(need check built-in engine" | |
| required: false | |
| type: string | |
| noBuiltInYakVersion: | |
| description: "No built-in yak version number" | |
| required: false | |
| type: boolean | |
| default: false | |
| devTool: | |
| description: "Display developer tools" | |
| required: false | |
| type: boolean | |
| default: false | |
| skipEnterpriseLicense: | |
| description: "Enterprise (ee): check to skip License verification; leave unchecked for default License check" | |
| required: false | |
| type: boolean | |
| default: false | |
| sign: | |
| description: "Sign installers when packaging" | |
| required: false | |
| type: boolean | |
| default: false | |
| jobs: | |
| build_yakit: | |
| runs-on: macos-15 | |
| env: | |
| CI: "" | |
| NODE_OPTIONS: --max_old_space_size=4096 | |
| outputs: | |
| win_artifact: ${{ steps.export_names.outputs.win_artifact }} | |
| steps: | |
| - name: Display incoming configuration parameters | |
| run: echo ${{ inputs.platform }} ${{ inputs.legacy }} ${{ inputs.version }} ${{ inputs.engine }} ${{ inputs.engineVersion }} ${{ inputs.devTool }} ${{ inputs.skipEnterpriseLicense }} ${{ inputs.sign }} | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.12.0 | |
| # 缓存 yarn 依赖包 ↓↓↓ | |
| cache: "yarn" | |
| cache-dependency-path: | | |
| yarn.lock | |
| app/renderer/src/main/yarn.lock | |
| app/renderer/engine-link-startup/yarn.lock | |
| - run: echo ${{ github.ref_name }} | |
| - run: cp buildutil/zip /usr/local/bin/zip | |
| - run: chmod +x /usr/local/bin/zip | |
| - run: zip -h | |
| - name: "Download yakit-chrome-extension" | |
| run: | | |
| extensionVersion=$(curl -fsL "http://yaklang.oss-accelerate.aliyuncs.com/chrome-extension/latest-version.txt") || { | |
| echo "Failed to download!" >&2 | |
| exit 1 | |
| } | |
| wget -O bins/scripts/google-chrome-plugin.zip https://yaklang.oss-accelerate.aliyuncs.com/chrome-extension/yakit-chrome-extension-v${extensionVersion}.zip | |
| shell: bash | |
| - name: "Fetch Latest EngineVersion" | |
| if: ${{ inputs.engine && !inputs.engineVersion }} | |
| run: wget -O bins/engine-version.txt https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/version.txt | |
| - name: "Fetch Specify EngineVersion" | |
| if: ${{ inputs.engine && inputs.engineVersion }} | |
| run: | | |
| mkdir -p bins | |
| echo "${{ inputs.engineVersion }}" > bins/engine-version.txt | |
| - if: ${{ inputs.engine }} | |
| run: | | |
| cat bins/engine-version.txt | |
| YAK_VERSION=$(cat bins/engine-version.txt | tr -d '\n') | |
| echo "ENGINE_VERSION=$YAK_VERSION" >> $GITHUB_ENV | |
| - if: ${{ inputs.engine && inputs.noBuiltInYakVersion }} | |
| run: rm ./bins/engine-version.txt | |
| - name: "Download Yak Engine via wget(MacOS)" | |
| if: ${{ inputs.engine && contains(fromJSON('["darwin","mwl"]'), inputs.platform) }} | |
| id: download-darwin-engine | |
| run: | | |
| wget -O bins/yak_darwin_amd64 https://yaklang.oss-accelerate.aliyuncs.com/yak/${{ inputs.engineVersion || env.ENGINE_VERSION }}/yak_darwin_amd64 | |
| if [ "${{ inputs.sign }}" != "true" ]; then | |
| zip ./bins/yak_darwin_amd64.zip ./bins/yak_darwin_amd64 && rm ./bins/yak_darwin_amd64 | |
| fi | |
| - name: "Download Yak Engine via wget(MacOS-arm64)" | |
| if: ${{ inputs.engine && contains(fromJSON('["darwin","mwl"]'), inputs.platform) }} | |
| id: download-darwin-engine-arm64 | |
| run: | | |
| wget -O bins/yak_darwin_arm64 https://yaklang.oss-accelerate.aliyuncs.com/yak/${{ inputs.engineVersion || env.ENGINE_VERSION }}/yak_darwin_arm64 | |
| if [ "${{ inputs.sign }}" != "true" ]; then | |
| zip ./bins/yak_darwin_arm64.zip ./bins/yak_darwin_arm64 && rm ./bins/yak_darwin_arm64 | |
| fi | |
| - name: Signature Mac Engine | |
| if: ${{ inputs.sign && inputs.engine && contains(fromJSON('["darwin","mwl"]'), inputs.platform) }} | |
| env: | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| CERT_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} | |
| CERT_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| run: chmod +x ./packageScript/script/signature.sh && ./packageScript/script/signature.sh | |
| shell: bash | |
| - name: Fetch macOS sha256 | |
| if: ${{ inputs.engine && contains(fromJSON('["darwin","mwl"]'), inputs.platform) }} | |
| run: | | |
| wget -O bins/yak_darwin_amd64.sha256.txt https://yaklang.oss-accelerate.aliyuncs.com/yak/${{ inputs.engineVersion || env.ENGINE_VERSION }}/yak_darwin_amd64.sha256.txt | |
| wget -O bins/yak_darwin_arm64.sha256.txt https://yaklang.oss-accelerate.aliyuncs.com/yak/${{ inputs.engineVersion || env.ENGINE_VERSION }}/yak_darwin_arm64.sha256.txt | |
| shell: bash | |
| - name: "Download Yak Engine via wget(Linux)" | |
| if: ${{ inputs.engine && contains(fromJSON('["linux","uos","mwl"]'), inputs.platform) }} | |
| id: download-linux-engine | |
| run: wget -O bins/yak_linux_amd64 https://yaklang.oss-accelerate.aliyuncs.com/yak/${{ inputs.engineVersion || env.ENGINE_VERSION }}/yak_linux_amd64 && zip ./bins/yak_linux_amd64.zip ./bins/yak_linux_amd64 && rm ./bins/yak_linux_amd64 | |
| - name: "Download Yak Engine via wget(Linux-arm64)" | |
| if: ${{ inputs.engine && contains(fromJSON('["linux","uos","mwl"]'), inputs.platform) }} | |
| id: download-linux-engine-arm64 | |
| run: wget -O bins/yak_linux_arm64 https://yaklang.oss-accelerate.aliyuncs.com/yak/${{ inputs.engineVersion || env.ENGINE_VERSION }}/yak_linux_arm64 && zip ./bins/yak_linux_arm64.zip ./bins/yak_linux_arm64 && rm ./bins/yak_linux_arm64 | |
| - name: "Download Yak Engine via wget(Windows)" | |
| if: ${{ inputs.engine && !inputs.legacy && contains(fromJSON('["windows","mwl"]'), inputs.platform) }} | |
| id: download-windows-engine | |
| run: wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/${{ inputs.engineVersion || env.ENGINE_VERSION }}/yak_windows_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe | |
| - name: "Download Yak Legacy Engine via wget(Windows)" | |
| if: ${{ inputs.engine && inputs.legacy && contains(fromJSON('["windows","mwl"]'), inputs.platform) }} | |
| id: download-windows-leagacy-engine | |
| run: wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/${{ inputs.engineVersion || env.ENGINE_VERSION }}/yak_windows_legacy_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe | |
| - name: Extract Package.json Version | |
| id: extract_version | |
| uses: Saionaro/extract-package-version@v1.1.1 | |
| - name: Crop Yakit-CE Package.json Version | |
| uses: mad9000/actions-find-and-replace-string@5 | |
| id: package_ce_version | |
| with: | |
| source: ${{ steps.extract_version.outputs.version }} | |
| find: "-ce" | |
| replace: "" | |
| - name: Crop Yakit-EE Package.json Version | |
| uses: mad9000/actions-find-and-replace-string@5 | |
| id: package_version | |
| with: | |
| source: ${{ steps.package_ce_version.outputs.value }} | |
| find: "-ee" | |
| replace: "" | |
| - name: Echo Yakit Package Version | |
| run: echo "SOFTWARE_VERSION=${{ steps.package_version.outputs.value }}" >> $GITHUB_ENV | |
| - name: "Install Dependencies" | |
| run: yarn install && yarn install-render && yarn install-link-render | |
| working-directory: ./ | |
| - name: "Install Legacy Electron" | |
| run: yarn remove electron && yarn add electron@22.3.27 --dev | |
| if: ${{ inputs.legacy }} | |
| working-directory: ./ | |
| - name: "Build CE Render" | |
| if: ${{ inputs.version == 'ce' }} | |
| working-directory: ./ | |
| run: yarn build${{ inputs.devTool && '-test' || '' }}-renders | |
| - name: "Build EE Render" | |
| if: ${{ inputs.version == 'ee' }} | |
| working-directory: ./ | |
| run: yarn build-renders${{ inputs.devTool && '-test' || '' }}${{ inputs.skipEnterpriseLicense && '-enterprise-no-license' || '-enterprise' }} | |
| - name: "Build SE Render" | |
| if: ${{ inputs.version == 'se' }} | |
| working-directory: ./ | |
| run: yarn build-renders${{ inputs.devTool && '-test' || '' }}-simple-enterprise | |
| - name: "Build IRify Render" | |
| if: ${{ inputs.version == 'irify' }} | |
| working-directory: ./ | |
| run: yarn build-renders${{ inputs.devTool && '-test' || '' }}-irify | |
| - name: "Build IRifyEE Render" | |
| if: ${{ inputs.version == 'irifyee' }} | |
| working-directory: ./ | |
| run: yarn build-renders${{ inputs.devTool && '-test' || '' }}-irify-enterprise | |
| - name: "Build Memfit Render" | |
| if: ${{ inputs.version == 'memfit' }} | |
| working-directory: ./ | |
| run: yarn build-renders${{ inputs.devTool && '-test' || '' }}-memfit | |
| - name: Generate software prefix name | |
| run: | | |
| if [ "${{ inputs.version }}" = "ce" ]; then | |
| echo "ENV_Software_Name=Yakit" >> $GITHUB_ENV | |
| elif [ "${{ inputs.version }}" = "ee" ]; then | |
| echo "ENV_Software_Name=EnpriTrace" >> $GITHUB_ENV | |
| elif [ "${{ inputs.version }}" = "se" ]; then | |
| echo "ENV_Software_Name=EnpriTraceAgent" >> $GITHUB_ENV | |
| elif [ "${{ inputs.version }}" = "irify" ]; then | |
| echo "ENV_Software_Name=IRify" >> $GITHUB_ENV | |
| elif [ "${{ inputs.version }}" = "irifyee" ]; then | |
| echo "ENV_Software_Name=IRifyEnpriTrace" >> $GITHUB_ENV | |
| elif [ "${{ inputs.version }}" = "memfit" ]; then | |
| echo "ENV_Software_Name=MemfitAI" >> $GITHUB_ENV | |
| else | |
| echo "No software version obtained" >&2 | |
| exit 1 | |
| fi | |
| - name: Show ENV_Software_Name | |
| run: echo "ENV_Software_Name: $ENV_Software_Name" | |
| - name: Export artifact names | |
| id: export_names | |
| shell: bash | |
| run: | | |
| echo "win_artifact=${ENV_Software_Name}-${SOFTWARE_VERSION}-windows${{ inputs.legacy && '-legacy' || '' }}-amd64.exe" >> "$GITHUB_OUTPUT" | |
| - name: Prepare Mac app signing | |
| if: ${{ inputs.sign && !inputs.engine && contains(fromJSON('["darwin","mwl"]'), inputs.platform) }} | |
| env: | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| CERT_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} | |
| CERT_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| run: chmod +x ./packageScript/script/signature.sh && ./packageScript/script/signature.sh build | |
| shell: bash | |
| - name: Enable code signing env | |
| if: ${{ inputs.sign && contains(fromJSON('["darwin","mwl"]'), inputs.platform) }} | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ACCOUNT_EMAIL }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| CERT_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} | |
| CERT_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| run: | | |
| echo "APPLE_ID=${APPLE_ID}" >> $GITHUB_ENV | |
| echo "APPLE_APP_SPECIFIC_PASSWORD=${APPLE_APP_SPECIFIC_PASSWORD}" >> $GITHUB_ENV | |
| echo "APPLE_TEAM_ID=${APPLE_TEAM_ID}" >> $GITHUB_ENV | |
| echo "CERT_PASSWORD=${CERT_PASSWORD}" >> $GITHUB_ENV | |
| { | |
| echo "CERT_BASE64<<EOF" | |
| echo "${CERT_BASE64}" | |
| echo "EOF" | |
| } >> $GITHUB_ENV | |
| shell: bash | |
| - name: Build Yakit (MultiPlatform) | |
| if: ${{ inputs.platform == 'mwl' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| working-directory: ./ | |
| run: | | |
| set -e | |
| yarn add -D dmg-license | |
| if [ "${{ inputs.version }}" = "ce" ]; then | |
| yarn pack-mac${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-linux${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-win${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "ee" ]; then | |
| yarn pack-mac-ee${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-linux-ee${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-win-ee${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "se" ]; then | |
| yarn pack-mac-se${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-linux-se${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-win-se${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "irify" ]; then | |
| yarn pack-mac-irify${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-linux-irify${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-win-irify${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "irifyee" ]; then | |
| yarn pack-mac-irify-ee${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-linux-irify-ee${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-win-irify-ee${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "memfit" ]; then | |
| yarn pack-mac-memfit${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-linux-memfit${{ inputs.legacy && '-legacy' || '' }} | |
| yarn pack-win-memfit${{ inputs.legacy && '-legacy' || '' }} | |
| else | |
| echo "未知的输入值: ${{ inputs.version }}" >&2 | |
| exit 1 | |
| fi | |
| - name: Build Yakit (MAC) | |
| if: ${{ inputs.platform == 'darwin' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| working-directory: ./ | |
| run: | | |
| if [ "${{ inputs.version }}" = "ce" ]; then | |
| yarn pack-mac${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "ee" ]; then | |
| yarn pack-mac-ee${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "se" ]; then | |
| yarn pack-mac-se${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "irify" ]; then | |
| yarn pack-mac-irify${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "irifyee" ]; then | |
| yarn pack-mac-irify-ee${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "memfit" ]; then | |
| yarn pack-mac-memfit${{ inputs.legacy && '-legacy' || '' }} | |
| else | |
| echo "未知的输入值: ${{ inputs.version }}" >&2 | |
| exit 1 | |
| fi | |
| - name: Build Yakit (LINUX) | |
| if: ${{ inputs.platform == 'linux' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| working-directory: ./ | |
| run: | | |
| if [ "${{ inputs.version }}" = "ce" ]; then | |
| yarn pack-linux${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "ee" ]; then | |
| yarn pack-linux-ee${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "se" ]; then | |
| yarn pack-linux-se${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "irify" ]; then | |
| yarn pack-linux-irify${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "irifyee" ]; then | |
| yarn pack-linux-irify-ee${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "memfit" ]; then | |
| yarn pack-linux-memfit${{ inputs.legacy && '-legacy' || '' }} | |
| else | |
| echo "未知的输入值: ${{ inputs.version }}" >&2 | |
| exit 1 | |
| fi | |
| - name: Build Yakit (WIN) | |
| if: ${{ inputs.platform == 'windows' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| working-directory: ./ | |
| run: | | |
| if [ "${{ inputs.version }}" = "ce" ]; then | |
| yarn pack-win${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "ee" ]; then | |
| yarn pack-win-ee${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "se" ]; then | |
| yarn pack-win-se${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "irify" ]; then | |
| yarn pack-win-irify${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "irifyee" ]; then | |
| yarn pack-win-irify-ee${{ inputs.legacy && '-legacy' || '' }} | |
| elif [ "${{ inputs.version }}" = "memfit" ]; then | |
| yarn pack-win-memfit${{ inputs.legacy && '-legacy' || '' }} | |
| else | |
| echo "未知的输入值: ${{ inputs.version }}" >&2 | |
| exit 1 | |
| fi | |
| - name: Build Yakit (UOS) | |
| if: ${{ inputs.platform == 'uos' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| LEGACY_SUFFIX: ${{ inputs.legacy && '-legacy' || '' }} # 处理 legacy 后缀逻辑 | |
| working-directory: ./ | |
| run: | | |
| if [ "${{ inputs.version }}" = "ce" ]; then | |
| yarn pack-linux${{ env.LEGACY_SUFFIX }} | |
| elif [ "${{ inputs.version }}" = "ee" ]; then | |
| yarn pack-linux-ee${{ env.LEGACY_SUFFIX }} | |
| elif [ "${{ inputs.version }}" = "se" ]; then | |
| yarn pack-linux-se${{ env.LEGACY_SUFFIX }} | |
| elif [ "${{ inputs.version }}" = "irify" ]; then | |
| yarn pack-linux-irify${{ env.LEGACY_SUFFIX }} | |
| elif [ "${{ inputs.version }}" = "irifyee" ]; then | |
| yarn pack-linux-irify-ee${{ env.LEGACY_SUFFIX }} | |
| elif [ "${{ inputs.version }}" = "memfit" ]; then | |
| yarn pack-linux-memfit${{ env.LEGACY_SUFFIX }} | |
| else | |
| echo "未知的输入值: ${{ inputs.version }}" >&2 | |
| exit 1 | |
| fi | |
| - name: MakeSelf Yakit (UOS) | |
| if: ${{ inputs.platform == 'uos' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| LEGACY_SUFFIX: ${{ inputs.legacy && '-legacy' || '' }} # 处理 legacy 后缀逻辑 | |
| working-directory: ./ | |
| run: | | |
| folder_amd64="${{ env.ENV_Software_Name }}-${{ env.SOFTWARE_VERSION }}-linux${{ env.LEGACY_SUFFIX }}-amd64" | |
| folder_arm64="${{ env.ENV_Software_Name }}-${{ env.SOFTWARE_VERSION }}-linux${{ env.LEGACY_SUFFIX }}-arm64" | |
| mkdir -p "release/${folder_amd64}" "release/${folder_arm64}" | |
| cp -f packageScript/script/uos-legacy-arm.sh "release/${folder_amd64}" | |
| cp -f packageScript/script/uos-legacy-arm.sh "release/${folder_arm64}" | |
| cd release | |
| cp -f "${folder_amd64}.AppImage" "${folder_amd64}" | |
| cp -f "${folder_arm64}.AppImage" "${folder_arm64}" | |
| chmod +rwx "${folder_amd64}/uos-legacy-arm.sh" | |
| chmod +rwx "${folder_amd64}/${folder_amd64}.AppImage" | |
| chmod +rwx "${folder_arm64}/uos-legacy-arm.sh" | |
| chmod +rwx "${folder_arm64}/${folder_arm64}.AppImage" | |
| ls "${folder_amd64}" | |
| ls "${folder_arm64}" | |
| brew install makeself | |
| makeself --gzip "${folder_amd64}" "${folder_amd64}.run" "${folder_amd64}" ./uos-legacy-arm.sh | |
| makeself --gzip "${folder_arm64}" "${folder_arm64}.run" "${folder_arm64}" ./uos-legacy-arm.sh | |
| shell: bash | |
| - name: View Published Content | |
| run: | |
| ls ./release | |
| # EnpriTraceAgent -1.3.4-sp6-darwin-arm64(.dmg|.exe|.AppImage) | |
| # EnpriTrace -1.3.4-sp6-darwin-arm64(.dmg|.exe|.AppImage) | |
| # Yakit -1.3.4-sp6-darwin-arm64(.dmg|.exe|.AppImage) | |
| # IRify -1.3.4-sp6-darwin-arm64(.dmg|.exe|.AppImage) | |
| # IRifyEnpriTrace -1.3.4-sp6-darwin-arm64(.dmg|.exe|.AppImage) | |
| # EnpriTrace -1.4.1-0426-linux-legacy-arm64.run | |
| - name: Upload Yakit(CE) Artifacts Windows | |
| if: ${{ contains(fromJSON('["windows","mwl"]'), inputs.platform) }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ENV_Software_Name }}-${{ env.SOFTWARE_VERSION }}-windows${{ inputs.legacy && '-legacy' || '' }}-amd64.exe | |
| path: ./release/${{env.ENV_Software_Name}}-${{env.SOFTWARE_VERSION}}-windows${{ inputs.legacy && '-legacy' || '' }}-amd64.exe | |
| if-no-files-found: error | |
| retention-days: 7 | |
| - name: Upload Yakit(CE) Artifacts Mac Amd | |
| if: ${{ contains(fromJSON('["darwin","mwl"]'), inputs.platform) }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ENV_Software_Name }}-${{ env.SOFTWARE_VERSION }}-darwin${{ inputs.legacy && '-legacy' || '' }}-x64.dmg | |
| path: ./release/${{env.ENV_Software_Name}}-${{env.SOFTWARE_VERSION}}-darwin${{ inputs.legacy && '-legacy' || '' }}-x64.dmg | |
| if-no-files-found: error | |
| retention-days: 7 | |
| - name: Upload Yakit(CE) Artifacts Mac Arm | |
| if: ${{ contains(fromJSON('["darwin","mwl"]'), inputs.platform) }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ENV_Software_Name }}-${{ env.SOFTWARE_VERSION }}-darwin${{ inputs.legacy && '-legacy' || '' }}-arm64.dmg | |
| path: ./release/${{env.ENV_Software_Name}}-${{env.SOFTWARE_VERSION}}-darwin${{ inputs.legacy && '-legacy' || '' }}-arm64.dmg | |
| if-no-files-found: error | |
| retention-days: 7 | |
| - name: Upload Yakit(CE) Artifacts Linux Amd | |
| if: ${{ contains(fromJSON('["linux","mwl"]'), inputs.platform) }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ENV_Software_Name }}-${{ env.SOFTWARE_VERSION }}-linux${{ inputs.legacy && '-legacy' || '' }}-amd64.AppImage | |
| path: ./release/${{env.ENV_Software_Name}}-${{env.SOFTWARE_VERSION}}-linux${{ inputs.legacy && '-legacy' || '' }}-amd64.AppImage | |
| if-no-files-found: error | |
| retention-days: 7 | |
| - name: Upload Yakit(CE) Artifacts Linux Arm | |
| if: ${{ contains(fromJSON('["linux","mwl"]'), inputs.platform) }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ENV_Software_Name }}-${{ env.SOFTWARE_VERSION }}-linux${{ inputs.legacy && '-legacy' || '' }}-arm64.AppImage | |
| path: ./release/${{env.ENV_Software_Name}}-${{env.SOFTWARE_VERSION}}-linux${{ inputs.legacy && '-legacy' || '' }}-arm64.AppImage | |
| if-no-files-found: error | |
| retention-days: 7 | |
| - name: Upload Yakit(CE) Artifacts UOS Amd | |
| if: ${{ contains(fromJSON('["uos"]'), inputs.platform) }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ENV_Software_Name }}-${{ env.SOFTWARE_VERSION }}-linux${{ inputs.legacy && '-legacy' || '' }}-amd64.run | |
| path: ./release/${{env.ENV_Software_Name}}-${{env.SOFTWARE_VERSION}}-linux${{ inputs.legacy && '-legacy' || '' }}-amd64.run | |
| if-no-files-found: error | |
| retention-days: 7 | |
| - name: Upload Yakit(CE) Artifacts UOS Arm | |
| if: ${{ contains(fromJSON('["uos"]'), inputs.platform) }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ENV_Software_Name }}-${{ env.SOFTWARE_VERSION }}-linux${{ inputs.legacy && '-legacy' || '' }}-arm64.run | |
| path: ./release/${{env.ENV_Software_Name}}-${{env.SOFTWARE_VERSION}}-linux${{ inputs.legacy && '-legacy' || '' }}-arm64.run | |
| if-no-files-found: error | |
| retention-days: 7 | |
| # 给 Windows 安装包外壳做 Authenticode 签名(仅 windows/mwl 平台) | |
| # 下载 build_yakit 产出的安装包,签名后用 overwrite 覆盖回同名 artifact | |
| sign_windows: | |
| needs: build_yakit | |
| if: ${{ contains(fromJSON('["windows","mwl"]'), inputs.platform) }} | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download windows installer artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.build_yakit.outputs.win_artifact }} | |
| path: release | |
| - name: Sign Windows installer | |
| uses: ./.github/actions/sign-windows | |
| with: | |
| path: release | |
| key-vault-url: ${{ secrets.AZURE_YAK_CODE_SIGN_KEY_VAULT_URI }} | |
| key-vault-client-id: ${{ secrets.AZURE_YAK_CODE_SIGN_KEY_VAULT_APPLICATION_ID }} | |
| key-vault-tenant-id: ${{ secrets.AZURE_YAK_CODE_SIGN_KEY_VAULT_DIRECTORY_ID }} | |
| key-vault-client-secret: ${{ secrets.AZURE_YAK_CODE_SIGN_KEY_VAULT_CLIENT_SECRET }} | |
| key-vault-certificate: ${{ secrets.AZURE_YAK_CODE_SIGN_KEY_VAULT_CERT_NAME }} | |
| timestamp-url: ${{ secrets.AZURE_YAK_CODE_SIGN_KEY_VAULT_TIMESTAMP_URL }} | |
| - name: Re-upload signed windows installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ needs.build_yakit.outputs.win_artifact }} | |
| path: release | |
| overwrite: true | |
| if-no-files-found: error | |
| retention-days: 7 |