Desktop Non-Interactive Integration #256
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: Desktop Non-Interactive Integration | |
| on: | |
| workflow_run: | |
| workflows: | |
| - Build Hagicode Desktop | |
| types: | |
| - completed | |
| permissions: | |
| actions: read | |
| contents: read | |
| env: | |
| NODE_VERSION: "24" | |
| HAGISCRIPT_VERSION: "latest" | |
| HAGICODE_PM2_LIFECYCLE_TIMEOUT_MS: "90000" | |
| jobs: | |
| integration-linux: | |
| name: Non-Interactive Integration (Linux) | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout triggering commit | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_sha }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: "npm" | |
| cache-dependency-path: package-lock.json | |
| - name: Install global hagiscript | |
| shell: bash | |
| run: | | |
| npm install --global "@hagicode/hagiscript@${HAGISCRIPT_VERSION}" | |
| prefix="$(npm config get prefix)" | |
| echo "$prefix" >> "$GITHUB_PATH" | |
| if [ -d "$prefix/bin" ]; then | |
| echo "$prefix/bin" >> "$GITHUB_PATH" | |
| fi | |
| hash -r | |
| hagiscript --version | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build main-process helpers | |
| run: npm run build:tsc | |
| - name: Download Linux tar.gz artifact | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| node scripts/download-workflow-artifact.mjs \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --run-id "${{ github.event.workflow_run.id }}" \ | |
| --artifact-name "release-linux-tar-gz-assets,hagicode-linux-tar-gz-${{ github.event.workflow_run.head_sha }}" \ | |
| --output-dir pkg | |
| - name: Run non-interactive runtime verification and dependency install integration | |
| run: npm run package:non-interactive-integration | |
| integration-macos: | |
| name: Non-Interactive Integration (macOS) | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout triggering commit | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_sha }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: "npm" | |
| cache-dependency-path: package-lock.json | |
| - name: Install global hagiscript | |
| shell: bash | |
| run: | | |
| npm install --global "@hagicode/hagiscript@${HAGISCRIPT_VERSION}" | |
| prefix="$(npm config get prefix)" | |
| echo "$prefix" >> "$GITHUB_PATH" | |
| if [ -d "$prefix/bin" ]; then | |
| echo "$prefix/bin" >> "$GITHUB_PATH" | |
| fi | |
| hash -r | |
| hagiscript --version | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build main-process helpers | |
| run: npm run build:tsc | |
| - name: Download macOS ZIP artifact | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| node scripts/download-workflow-artifact.mjs \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --run-id "${{ github.event.workflow_run.id }}" \ | |
| --artifact-name "release-macos-x64-zip-assets,hagicode-macos-x64-zip-${{ github.event.workflow_run.head_sha }}" \ | |
| --output-dir pkg | |
| node scripts/download-workflow-artifact.mjs \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --run-id "${{ github.event.workflow_run.id }}" \ | |
| --artifact-name "release-macos-arm64-zip-assets,hagicode-macos-arm64-zip-${{ github.event.workflow_run.head_sha }}" \ | |
| --output-dir pkg | |
| - name: Run non-interactive runtime verification and dependency install integration | |
| run: npm run package:non-interactive-integration | |
| integration-windows: | |
| name: Non-Interactive Integration (Windows) | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout triggering commit | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_sha }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: "npm" | |
| cache-dependency-path: package-lock.json | |
| - name: Install global hagiscript | |
| shell: bash | |
| run: | | |
| npm install --global "@hagicode/hagiscript@${HAGISCRIPT_VERSION}" | |
| prefix="$(npm config get prefix)" | |
| echo "$prefix" >> "$GITHUB_PATH" | |
| if [ -d "$prefix/bin" ]; then | |
| echo "$prefix/bin" >> "$GITHUB_PATH" | |
| fi | |
| hash -r | |
| hagiscript --version | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build main-process helpers | |
| run: npm run build:tsc | |
| - name: Download Windows ZIP artifact | |
| shell: bash | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| node scripts/download-workflow-artifact.mjs \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --run-id "${{ github.event.workflow_run.id }}" \ | |
| --artifact-name "release-windows-portable-assets,hagicode-windows-portable-${{ github.event.workflow_run.head_sha }}" \ | |
| --output-dir pkg | |
| - name: Run non-interactive runtime verification and dependency install integration | |
| shell: bash | |
| run: npm run package:non-interactive-integration |