diff --git a/.github/workflows/windows7-ci.yml b/.github/workflows/windows7-ci.yml new file mode 100644 index 0000000000..9822efd967 --- /dev/null +++ b/.github/workflows/windows7-ci.yml @@ -0,0 +1,105 @@ +name: Yakit-Windows7 + +on: + push: + branches: + - "ci/win7*" + +jobs: + build_yakit: + runs-on: macos-latest + if: ${{ startsWith(github.ref, 'refs/heads/ci/win7-') }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 18.18.2 + + - 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(Windows)" + 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 Version + id: extract_version + uses: Saionaro/extract-package-version@v1.1.1 + - name: Echo Yakit Package Version + run: echo ${{ steps.extract_version.outputs.version }} + + - run: wget -O bins/database/default-cve.db.gzip https://cve-db.oss-accelerate.aliyuncs.com/default-cve.db.gzip + if: ${{ startsWith(github.ref, 'refs/heads/ci/win7-ee') }} + 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 + if: ${{ startsWith(github.ref, 'refs/heads/ci/win7-ee') }} + name: "Download Plugin resource Files (EnpriTrace && EnpriTraceAgent)" + + - run: yarn install-render + working-directory: ./ + name: "Install Render Dependencies" + env: + CI: "" + NODE_OPTIONS: --max_old_space_size=4096 + + - name: "Build EE Render" + run: yarn build-render-enterprise + if: ${{ startsWith(github.ref, 'refs/heads/ci/win7-ee') }} + working-directory: ./ + env: + CI: "" + NODE_OPTIONS: --max_old_space_size=4096 + + - name: "Build CE Render" + run: yarn build-render + if: ${{ startsWith(github.ref, 'refs/heads/ci/win7-ce') }} + working-directory: ./ + env: + CI: "" + NODE_OPTIONS: --max_old_space_size=4096 + + - run: yarn install + working-directory: ./ + name: "Install Dependencies" + env: + CI: "" + NODE_OPTIONS: --max_old_space_size=4096 + + - name: Build Yakit (EE) + if: ${{ startsWith(github.ref, 'refs/heads/ci/win7-ee') }} + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + working-directory: ./ + run: | + yarn add -D dmg-license && yarn pack-win-ee + - name: Build Yakit (CE) + if: ${{ startsWith(github.ref, 'refs/heads/ci/win7-ce') }} + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + working-directory: ./ + run: | + yarn add -D dmg-license && yarn pack-win + - name: View Published Content + run: ls ./release + + # 社区版 + - name: Upload Yakit(CE) Artifacts Windows + uses: actions/upload-artifact@v2 + if: ${{ startsWith(github.ref, 'refs/heads/ci/win7-ce') }} + with: + name: Yakit-${{ steps.extract_version.outputs.version }}-windows-amd64.exe + path: ./release/Yakit-${{ steps.extract_version.outputs.version }}-windows-amd64.exe + + # start Enterprise Edition + - name: Upload Yakit(EE) Artifacts Windows + uses: actions/upload-artifact@v2 + if: ${{ startsWith(github.ref, 'refs/heads/ci/win7-ee') }} + with: + name: EnpriTrace-${{ steps.extract_version.outputs.version }}-windows-amd64.exe + path: ./release/EnpriTrace-${{ steps.extract_version.outputs.version }}-windows-amd64.exe \ No newline at end of file diff --git a/package.json b/package.json index 4538c8b26e..784198df4a 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "license": "ISC", "devDependencies": { "concurrently": "^6.2.0", - "electron": "27.0.0", + "electron": "22.3.27", "electron-builder": "23.6.0", "protoc-gen-ts": "^0.3.9", "typescript": "^4.1.2",