Skip to content

v1.3.7-1122-ee

v1.3.7-1122-ee #4

Workflow file for this run

name: Yakit-SE-CI
# 简易版
on:
push:
branches:
- "ci/se-*"
jobs:
build_yakit:
runs-on: macos-13
env:
CI: ""
NODE_OPTIONS: --max_old_space_size=4096
IS_TAG_RELEASE: "ci/se"
PACKAGING_PLATFORM: ${{ contains(github.ref, 'mac') && 'mac' || contains(github.ref, 'linux') && 'linux' || contains(github.ref, 'win') && 'win' || 'mwl' }}
COMPATIBILITY_MODE: ${{ (startsWith(github.ref, 'refs/heads/ci/se-') && contains(github.ref, 'legacy')) && 'legacy' || 'normal' }}
steps:
- name: Show Custom ENV
run: echo ${{ env.IS_TAG_RELEASE }} ${{ env.PACKAGING_PLATFORM }} ${{ env.COMPATIBILITY_MODE }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.2
# 缓存 yarn 依赖包 ↓↓↓
# cache: "yarn"
# cache-dependency-path: |
# yarn.lock
# app/renderer/src/main/yarn.lock
- run: echo ${{ github.ref }}
- run: cp buildutil/zip /usr/local/bin/zip
- run: chmod +x /usr/local/bin/zip
- run: zip -h
- name: "Download Yak Engine via wget(MacOS)"
if: ${{ env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'mac' }}
id: download-darwin-engine
run: wget -O bins/yak_darwin_amd64 https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_darwin_amd64 && zip ./bins/yak_darwin_amd64.zip ./bins/yak_darwin_amd64 && rm ./bins/yak_darwin_amd64
- name: "Download Yak Engine via wget(MacOS-arm64)"
if: ${{ env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'mac' }}
id: download-darwin-engine-arm64
run: wget -O bins/yak_darwin_arm64 https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_darwin_arm64 && zip ./bins/yak_darwin_arm64.zip ./bins/yak_darwin_arm64 && rm ./bins/yak_darwin_arm64
- name: "Download Yak Engine via wget(Linux)"
if: ${{ env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'linux' }}
id: download-linux-engine
run: wget -O bins/yak_linux_amd64 https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/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: ${{ env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'linux' }}
id: download-linux-engine-arm64
run: wget -O bins/yak_linux_arm64 https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/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: ${{ env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'win' }}
id: download-windows-engine
run: wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_windows_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe
- name: "Fetch Latest EngineVersion"
id: fetch-version-engine
run: wget -O bins/engine-version.txt https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/version.txt
- run: ls ./bins && cat bins/engine-version.txt
- name: Extract Package.json Version
id: extract_version
uses: Saionaro/[email protected]
- name: Set 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: Set 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 ${{ steps.package_version.outputs.value }}
- run: wget -O bins/database/default-cve.db.gzip https://cve-db.oss-accelerate.aliyuncs.com/default-cve.db.gzip
name: "Download CVE(Include CWE) Data (EnpriTrace && EnpriTraceAgent)"
- run: wget -O bins/resources/local-plugins-se.yakitresource.txt https://yaklang.oss-accelerate.aliyuncs.com/yakit-ee/local-plugins-se.yakitresource.txt
name: "Download Plugin resource Files (EnpriTrace && EnpriTraceAgent)"
- run: yarn install && yarn install-render
working-directory: ./
name: "Install Dependencies"
- name: "Build SE Render"
working-directory: ./
run: yarn build-render-simple-enterprise
- name: Build SE Yakit (MultiPlatform)
if: ${{ env.PACKAGING_PLATFORM == 'mwl' && env.COMPATIBILITY_MODE == 'normal' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: ./
run: yarn add -D dmg-license && yarn electron-publish-se
- name: Build SE Yakit (MAC)
if: ${{ env.PACKAGING_PLATFORM == 'mac' && env.COMPATIBILITY_MODE == 'normal' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: ./
run: yarn pack-mac-se
- name: Build SE Yakit (LINUX)
if: ${{ env.PACKAGING_PLATFORM == 'linux' && env.COMPATIBILITY_MODE == 'normal' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: ./
run: yarn pack-linux-se
- name: Build SE Yakit (WIN)
if: ${{ env.PACKAGING_PLATFORM == 'win' && env.COMPATIBILITY_MODE == 'normal' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: ./
run: yarn pack-win-se
- run: yarn add [email protected]
if: ${{ env.COMPATIBILITY_MODE == 'legacy' }}
working-directory: ./
name: "Install Legacy Electron"
- name: "Download Yak Legacy Engine via wget(Windows)"
if: ${{ env.PACKAGING_PLATFORM == 'mwl' && env.COMPATIBILITY_MODE == 'legacy' }}
id: download-windows-leagacy-engine
run: rm ./bins/yak_windows_amd64.zip && wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_windows_legacy_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe
- name: Build SE Yakit Legacy (MultiPlatform)
if: ${{ env.PACKAGING_PLATFORM == 'mwl' && env.COMPATIBILITY_MODE == 'legacy' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: ./
run: yarn add -D dmg-license && yarn electron-publish-se-legacy
- name: Build SE Yakit Legacy (MAC)
if: ${{ env.PACKAGING_PLATFORM == 'mac' && env.COMPATIBILITY_MODE == 'legacy' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: ./
run: yarn pack-mac-se-legacy
- name: Build SE Yakit Legacy (LINUX)
if: ${{ env.PACKAGING_PLATFORM == 'linux' && env.COMPATIBILITY_MODE == 'legacy' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: ./
run: yarn pack-linux-se-legacy
- name: Build SE Yakit Legacy (WIN)
if: ${{ env.PACKAGING_PLATFORM == 'win' && env.COMPATIBILITY_MODE == 'legacy' }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
working-directory: ./
run: yarn pack-win-se-legacy
- name: View Published Content
run:
ls ./release
# EnpriTraceAgent-1.3.5-0815-darwin-arm64.dmg
# EnpriTraceAgent-1.3.5-0815-darwin-x64.dmg
# EnpriTraceAgent-1.3.5-0815-linux-amd64.AppImage
# EnpriTraceAgent-1.3.5-0815-windows-amd64.exe
# EnpriTraceAgent-1.3.5-0815-darwin-legacy-arm64.dmg
# EnpriTraceAgent-1.3.5-0815-darwin-legacy-x64.dmg
# EnpriTraceAgent-1.3.5-0815-linux-legacy-amd64.AppImage
# EnpriTraceAgent-1.3.5-0815-windows-legacy-amd64.exe
- name: Upload Yakit(SE) Artifacts Windows
uses: actions/upload-artifact@v4
if: ${{ (env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'win') && env.COMPATIBILITY_MODE == 'normal' }}
with:
# EnpriTraceAgent-1.3.5-0815-windows-amd64.exe
name: EnpriTraceAgent-${{ steps.package_version.outputs.value }}-windows-amd64.exe
path: ./release/EnpriTraceAgent-${{ steps.package_version.outputs.value }}-windows-amd64.exe
if-no-files-found: error
- name: Upload Yakit(SE) Artifacts Mac(m1)
uses: actions/upload-artifact@v4
if: ${{ (env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'mac') && env.COMPATIBILITY_MODE == 'normal' }}
with:
# EnpriTraceAgent-1.3.5-0815-darwin-arm64.dmg
name: EnpriTraceAgent-${{ steps.package_version.outputs.value }}-darwin-arm64.dmg
path: ./release/EnpriTraceAgent-${{ steps.package_version.outputs.value }}-darwin-arm64.dmg
if-no-files-found: error
- name: Upload Yakit(SE) Artifacts Mac(intel)
uses: actions/upload-artifact@v4
if: ${{ (env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'mac') && env.COMPATIBILITY_MODE == 'normal' }}
with:
# EnpriTraceAgent-1.3.5-0815-darwin-x64.dmg
name: EnpriTraceAgent-${{ steps.package_version.outputs.value }}-darwin-x64.dmg
path: ./release/EnpriTraceAgent-${{ steps.package_version.outputs.value }}-darwin-x64.dmg
if-no-files-found: error
- name: Upload Yakit(SE) Artifacts Linux(amd64)
uses: actions/upload-artifact@v4
if: ${{ (env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'linux') && env.COMPATIBILITY_MODE == 'normal' }}
with:
# EnpriTraceAgent-1.3.5-0815-linux-amd64.AppImage
name: EnpriTraceAgent-${{ steps.package_version.outputs.value }}-linux-amd64.AppImage
path: ./release/EnpriTraceAgent-${{ steps.package_version.outputs.value }}-linux-amd64.AppImage
if-no-files-found: error
- name: Upload Yakit(SE) Artifacts Legacy Windows
uses: actions/upload-artifact@v4
if: ${{ (env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'win') && env.COMPATIBILITY_MODE == 'legacy' }}
with:
# EnpriTraceAgent-1.3.5-0815-windows-legacy-amd64.exe
name: EnpriTraceAgent-${{ steps.package_version.outputs.value }}-windows-legacy-amd64.exe
path: ./release/EnpriTraceAgent-${{ steps.package_version.outputs.value }}-windows-legacy-amd64.exe
if-no-files-found: error
- name: Upload Yakit(SE) Artifacts Legacy Mac(m1)
uses: actions/upload-artifact@v4
if: ${{ (env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'mac') && env.COMPATIBILITY_MODE == 'legacy' }}
with:
# EnpriTraceAgent-1.3.5-0815-darwin-legacy-arm64.dmg
name: EnpriTraceAgent-${{ steps.package_version.outputs.value }}-darwin-legacy-arm64.dmg
path: ./release/EnpriTraceAgent-${{ steps.package_version.outputs.value }}-darwin-legacy-arm64.dmg
if-no-files-found: error
- name: Upload Yakit(SE) Artifacts Legacy Mac(intel)
uses: actions/upload-artifact@v4
if: ${{ (env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'mac') && env.COMPATIBILITY_MODE == 'legacy' }}
with:
# EnpriTraceAgent-1.3.5-0815-darwin-legacy-x64.dmg
name: EnpriTraceAgent-${{ steps.package_version.outputs.value }}-darwin-legacy-x64.dmg
path: ./release/EnpriTraceAgent-${{ steps.package_version.outputs.value }}-darwin-legacy-x64.dmg
if-no-files-found: error
- name: Upload Yakit(SE) Artifacts Legacy Linux(amd64)
uses: actions/upload-artifact@v4
if: ${{ (env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'linux') && env.COMPATIBILITY_MODE == 'legacy' }}
with:
# EnpriTraceAgent-1.3.5-0815-linux-legacy-amd64.AppImage
name: EnpriTraceAgent-${{ steps.package_version.outputs.value }}-linux-legacy-amd64.AppImage
path: ./release/EnpriTraceAgent-${{ steps.package_version.outputs.value }}-linux-legacy-amd64.AppImage
if-no-files-found: error