From fc2972be6dadeebf77e18935c6b4160a3395bf40 Mon Sep 17 00:00:00 2001 From: aopu-edu Date: Sun, 27 Mar 2022 11:33:59 +0800 Subject: [PATCH] update workflows file --- .github/workflows/build-and-release.yml | 165 +++++++++++++++++++++-- .github/workflows/build.yml | 169 ++++++++++++++++++++++-- 2 files changed, 310 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 1760498..2010ac5 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -59,17 +59,86 @@ jobs: needs: create-release runs-on: windows-2019 steps: - - uses: actions/checkout@v2 - - name: Use Node.js uses: actions/setup-node@v2 with: node-version: '14.x' - - name: Npm Install - run: | + - name: link Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-link + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-link + - run: | + cd openblock-link npm ci - + npm link + + - name: resource Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-resource + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-resource + - run: | + cd openblock-resource + npm ci + npm link + + - name: vm Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-vm + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-vm + - run: | + cd openblock-vm + npm ci + npm link + + - name: l10n Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-l10n + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-l10n + - run: | + cd openblock-l10n + npm ci + npm run build + npm link --force + + - name: gui Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-gui + ref: refs/heads/desktopqdp + token: ${{ secrets.GH_PAT }} + path: openblock-gui + - run: | + cd openblock-gui + npm ci + npm install --save-dev encoding@^0.1.13 iconv browser + npm link + npm link openblock-vm openblock-l10n + + - name: desktop Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-desktop + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-desktop + - run: | + cd openblock-desktop + npm ci + npm link openblock-vm openblock-l10n openblock-link openblock-resource openblock-gui + - name: Build and Publish env: GA_ID: ${{ secrets.GA_ID }} @@ -78,21 +147,93 @@ jobs: DO_SECRET_KEY: ${{ secrets.DO_SECRET_KEY }} NODE_ENV: production NODE_OPTIONS: --max_old_space_size=4096 - run: npm run publish + run: | + cd openblock-desktop + npm run publish build-mac: needs: create-release runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js uses: actions/setup-node@v2 with: node-version: '14.x' - - name: Npm Install - run: npm ci + - name: link Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-link + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-link + - run: | + cd openblock-link + npm i + npm link + + - name: resource Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-resource + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-resource + - run: | + cd openblock-resource + npm i + npm link + + - name: vm Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-vm + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-vm + - run: | + cd openblock-vm + npm i + npm link + + - name: l10n Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-l10n + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-l10n + - run: | + cd openblock-l10n + npm i + npm run build + npm link --force + + - name: gui Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-gui + ref: refs/heads/desktopqdp + token: ${{ secrets.GH_PAT }} + path: openblock-gui + - run: | + cd openblock-gui + npm i + npm install --save-dev encoding@^0.1.13 iconv browser + npm link + npm link openblock-vm openblock-l10n + + - name: desktop Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-desktop + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-desktop + - run: | + cd openblock-desktop + npm i + npm link openblock-vm openblock-l10n openblock-link openblock-resource openblock-gui - name: Build and Publish env: @@ -103,4 +244,6 @@ jobs: NODE_ENV: production NODE_OPTIONS: --max_old_space_size=8192 CSC_IDENTITY_AUTO_DISCOVERY: false - run: npm run publish + run: | + cd openblock-desktop + npm run publish diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02de709..41a283e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build Test App on: push: - branches: [ main ] + branches: [ qdp ] paths-ignore: - 'README.md' - 'CHANGE.md' @@ -13,43 +13,184 @@ jobs: build-windows: runs-on: windows-2019 steps: - - uses: actions/checkout@v2 - - name: Use Node.js uses: actions/setup-node@v2 with: node-version: '14.x' - - name: Npm Install - run: | + - name: link Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-link + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-link + - run: | + cd openblock-link + npm ci + npm link + + - name: resource Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-resource + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-resource + - run: | + cd openblock-resource + npm ci + npm link + + - name: vm Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-vm + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-vm + - run: | + cd openblock-vm + npm ci + npm link + + - name: l10n Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-l10n + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-l10n + - run: | + cd openblock-l10n + npm ci + npm run build + npm link --force + + - name: gui Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-gui + ref: refs/heads/desktopqdp + token: ${{ secrets.GH_PAT }} + path: openblock-gui + - run: | + cd openblock-gui npm ci + npm install --save-dev encoding@^0.1.13 iconv browser + npm link + npm link openblock-vm openblock-l10n + - name: desktop Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-desktop + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-desktop + - run: | + cd openblock-desktop + npm ci + npm link openblock-vm openblock-l10n openblock-link openblock-resource openblock-gui + - name: Build Dist env: GA_ID: ${{ secrets.GA_ID }} NODE_ENV: production NODE_OPTIONS: --max_old_space_size=4096 - run: npm run dist + run: | + cd openblock-desktop + npm run dist - name: Archive production artifacts uses: actions/upload-artifact@v2 with: name: OpenBlock-Desktop.exe - path: dist/OpenBlock-Desktop*.exe + path: openblock-desktop/dist/OpenBlock-Desktop*.exe retention-days: 1 build-mac: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js uses: actions/setup-node@v2 with: node-version: '14.x' - - name: Npm Install - run: npm ci + - name: link Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-link + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-link + - run: | + cd openblock-link + npm i + npm link + + - name: resource Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-resource + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-resource + - run: | + cd openblock-resource + npm i + npm link + + - name: vm Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-vm + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-vm + - run: | + cd openblock-vm + npm i + npm link + + - name: l10n Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-l10n + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-l10n + - run: | + cd openblock-l10n + npm i + npm run build + npm link --force + + - name: gui Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-gui + ref: refs/heads/desktopqdp + token: ${{ secrets.GH_PAT }} + path: openblock-gui + - run: | + cd openblock-gui + npm i + npm install --save-dev encoding@^0.1.13 iconv browser + npm link + npm link openblock-vm openblock-l10n + + - name: desktop Install + uses: actions/checkout@v2 + with: + repository: aopu-edu/openblock-desktop + ref: refs/heads/qdp + token: ${{ secrets.GH_PAT }} + path: openblock-desktop + - run: | + cd openblock-desktop + npm i + npm link openblock-vm openblock-l10n openblock-link openblock-resource openblock-gui - name: Build Dist env: @@ -57,11 +198,13 @@ jobs: NODE_ENV: production NODE_OPTIONS: --max_old_space_size=8192 CSC_IDENTITY_AUTO_DISCOVERY: false - run: npm run dist + run: | + cd openblock-desktop + npm run dist - name: Archive production artifacts uses: actions/upload-artifact@v2 with: name: OpenBlock-Desktop.dmg - path: dist/OpenBlock-Desktop*.dmg + path: openblock-desktop/dist/OpenBlock-Desktop*.dmg retention-days: 1