Skip to content

Commit

Permalink
feat: win7打包
Browse files Browse the repository at this point in the history
  • Loading branch information
youngster-yj committed Jul 19, 2024
1 parent d7714df commit 09da74c
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 1 deletion.
105 changes: 105 additions & 0 deletions .github/workflows/windows7-ci.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 09da74c

Please sign in to comment.