diff --git a/.github/workflows/build-helper.yml b/.github/workflows/build-helper.yml deleted file mode 100644 index 2f5aad3568..0000000000 --- a/.github/workflows/build-helper.yml +++ /dev/null @@ -1,208 +0,0 @@ -# Build Helper workflow - Builds, signs, and packages binaries for each supported platform, then uploads to a staging bucket in S3 for wider distribution. -# For more information on the macOS signing and notarization, see https://www.electron.build/code-signing and https://www.electron.build/configuration/mac -# For more information on the Windows Code Signing, see https://docs.digicert.com/en/digicert-keylocker/ci-cd-integrations/plugins/github-custom-action-for-keypair-signing.html and https://docs.digicert.com/en/digicert-keylocker/signing-tools/sign-authenticode-with-electron-builder-using-ksp-integration.html - -name: Build Helper -run-name: Build ${{ github.ref_name }}${{ github.event_name == 'workflow_dispatch' && ' - Manual' || '' }} -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+*" - workflow_dispatch: -env: - GO_VERSION: "1.24" - NODE_VERSION: 22 -jobs: - build-app: - outputs: - version: ${{ steps.set-version.outputs.WAVETERM_VERSION }} - strategy: - matrix: - include: - - platform: "darwin" - runner: "macos-latest" - - platform: "linux" - runner: "ubuntu-latest" - - platform: "linux" - runner: ubuntu-24.04-arm - - platform: "windows" - runner: "windows-latest" - # - platform: "windows" - # runner: "windows-11-arm64-16core" - runs-on: ${{ matrix.runner }} - steps: - - uses: actions/checkout@v5 - - name: Install Linux Build Dependencies (Linux only) - if: matrix.platform == 'linux' - run: | - sudo apt-get update - sudo apt-get install --no-install-recommends -y libarchive-tools libopenjp2-tools rpm squashfs-tools - sudo snap install snapcraft --classic - sudo snap install lxd - sudo lxd init --auto - sudo snap refresh - - name: Install Zig (not Mac) - if: matrix.platform != 'darwin' - uses: mlugg/setup-zig@v2 - - # The pre-installed version of the AWS CLI has a segfault problem so we'll install it via Homebrew instead. - - name: Upgrade AWS CLI (Mac only) - if: matrix.platform == 'darwin' - run: brew install awscli - - # The version of FPM that comes bundled with electron-builder doesn't include a Linux ARM target. Installing Gems onto the runner is super quick so we'll just do this for all targets. - - name: Install FPM (not Windows) - if: matrix.platform != 'windows' - run: sudo gem install fpm - - name: Install FPM (Windows only) - if: matrix.platform == 'windows' - run: gem install fpm - - # General build dependencies - - uses: actions/setup-go@v6 - with: - go-version: ${{env.GO_VERSION}} - cache-dependency-path: | - go.sum - - uses: actions/setup-node@v6 - with: - node-version: ${{env.NODE_VERSION}} - cache: npm - cache-dependency-path: package-lock.json - - name: Force git deps to HTTPS - run: | - git config --global url.https://github.com/.insteadof ssh://git@github.com/ - git config --global url.https://github.com/.insteadof git@github.com: - - uses: nick-fields/retry@v3 - name: npm ci - with: - command: npm ci --no-audit --no-fund - retry_on: error - max_attempts: 3 - timeout_minutes: 5 - env: - GIT_ASKPASS: "echo" - GIT_TERMINAL_PROMPT: "0" - - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: "Set Version" - id: set-version - run: echo "WAVETERM_VERSION=$(task version)" >> "$GITHUB_OUTPUT" - shell: bash - - # Windows Code Signing Setup - - name: Set up certificate (Windows only) - if: matrix.platform == 'windows' && github.event_name != 'workflow_dispatch' - run: | - echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12 - shell: bash - - name: Set signing variables (Windows only) - if: matrix.platform == 'windows' && github.event_name != 'workflow_dispatch' - id: variables - run: | - echo "SM_HOST=${{ secrets.SM_HOST }}" >> "$GITHUB_ENV" - echo "SM_API_KEY=${{ secrets.SM_API_KEY }}" >> "$GITHUB_ENV" - echo "SM_CODE_SIGNING_CERT_SHA1_HASH=${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }}" >> "$GITHUB_ENV" - echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_ENV" - echo "SM_CLIENT_CERT_FILE=D:\\Certificate_pkcs12.p12" >> "$GITHUB_OUTPUT" - echo "SM_CLIENT_CERT_PASSWORD=${{ secrets.SM_CLIENT_CERT_PASSWORD }}" >> "$GITHUB_ENV" - echo "C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $GITHUB_PATH - echo "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools" >> $GITHUB_PATH - echo "C:\Program Files\DigiCert\DigiCert Keylocker Tools" >> $GITHUB_PATH - shell: bash - - name: Setup Keylocker KSP (Windows only) - if: matrix.platform == 'windows' && github.event_name != 'workflow_dispatch' - run: | - curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/Keylockertools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o Keylockertools-windows-x64.msi - msiexec /i Keylockertools-windows-x64.msi /quiet /qn - C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user - smctl windows certsync - shell: cmd - - # Build and upload packages - - name: Build (Linux) - if: matrix.platform == 'linux' - run: task package - env: - USE_SYSTEM_FPM: true # Ensure that the installed version of FPM is used rather than the bundled one. - SNAPCRAFT_BUILD_ENVIRONMENT: host - # Retry Darwin build in case of notarization failures - - uses: nick-fields/retry@v3 - name: Build (Darwin) - if: matrix.platform == 'darwin' - with: - command: task package - timeout_minutes: 120 - retry_on: error - max_attempts: 3 - env: - USE_SYSTEM_FPM: true # Ensure that the installed version of FPM is used rather than the bundled one. - CSC_LINK: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_CERTIFICATE_2}} - CSC_KEY_PASSWORD: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_CERTIFICATE_PWD_2 }} - APPLE_ID: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_APPLE_ID_2 }} - APPLE_APP_SPECIFIC_PASSWORD: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_PWD_2 }} - APPLE_TEAM_ID: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_TEAM_ID_2 }} - STATIC_DOCSITE_PATH: ${{env.STATIC_DOCSITE_PATH}} - - name: Build (Windows) - if: matrix.platform == 'windows' - run: task package - env: - USE_SYSTEM_FPM: true # Ensure that the installed version of FPM is used rather than the bundled one. - CSC_LINK: ${{ steps.variables.outputs.SM_CLIENT_CERT_FILE }} - CSC_KEY_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }} - STATIC_DOCSITE_PATH: ${{env.STATIC_DOCSITE_PATH}} - shell: powershell # electron-builder's Windows code signing package has some compatibility issues with pwsh, so we need to use Windows Powershell - - # Upload artifacts to the S3 staging and to the workflow output for the draft release job - - name: Upload to S3 staging - if: github.event_name != 'workflow_dispatch' - run: task artifacts:upload - env: - AWS_ACCESS_KEY_ID: "${{ secrets.ARTIFACTS_KEY_ID }}" - AWS_SECRET_ACCESS_KEY: "${{ secrets.ARTIFACTS_KEY_SECRET }}" - AWS_DEFAULT_REGION: us-west-2 - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.runner }} - path: make - - name: Upload Snapcraft logs on failure - if: failure() - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.runner }}-log - path: /home/runner/.local/state/snapcraft/log - create-release: - runs-on: ubuntu-latest - needs: build-app - permissions: - contents: write - if: ${{ github.event_name != 'workflow_dispatch' }} - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - path: make - merge-multiple: true - - name: Create draft release - uses: softprops/action-gh-release@v2 - with: - prerelease: ${{ contains(github.ref_name, '-beta') }} - name: Wave Terminal ${{ github.ref_name }} Release - generate_release_notes: true - draft: true - files: | - make/*.zip - make/*.dmg - make/*.exe - make/*.msi - make/*.rpm - make/*.deb - make/*.pacman - make/*.snap - make/*.flatpak - make/*.AppImage diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml deleted file mode 100644 index 25d9b7149d..0000000000 --- a/.github/workflows/bump-version.yml +++ /dev/null @@ -1,89 +0,0 @@ -# Workflow to manage bumping the package version and pushing it to the target branch with a new tag. -# This workflow uses a GitHub App to bypass branch protection and uses the GitHub API directly to ensure commits and tags are signed. -# For more information, see this doc: https://github.com/Nautilus-Cyberneering/pygithub/blob/main/docs/how_to_sign_automatic_commits_in_github_actions.md - -name: Bump Version -run-name: "branch: ${{ github.ref_name }}; semver-bump: ${{ inputs.bump }}; prerelease: ${{ inputs.is-prerelease }}" -on: - workflow_dispatch: - inputs: - bump: - description: SemVer Bump - required: true - type: choice - default: none - options: - - none - - patch - - minor - - major - is-prerelease: - description: Is Prerelease - required: true - type: boolean - default: true -env: - NODE_VERSION: 22 -jobs: - bump-version: - runs-on: ubuntu-latest - steps: - - name: Get App Token - uses: actions/create-github-app-token@v2 - id: app-token - with: - app-id: ${{ vars.WAVE_BUILDER_APPID }} - private-key: ${{ secrets.WAVE_BUILDER_KEY }} - - uses: actions/checkout@v5 - with: - token: ${{ steps.app-token.outputs.token }} - - # General build dependencies - - uses: actions/setup-node@v6 - with: - node-version: ${{env.NODE_VERSION}} - cache: npm - cache-dependency-path: package-lock.json - - uses: nick-fields/retry@v3 - name: npm ci - with: - command: npm ci --no-audit --no-fund - retry_on: error - max_attempts: 3 - timeout_minutes: 5 - - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - name: "Bump Version: ${{ inputs.bump }}" - id: bump-version - run: echo "WAVETERM_VERSION=$( task version -- ${{ inputs.bump }} ${{inputs.is-prerelease}} )" >> "$GITHUB_OUTPUT" - shell: bash - - - name: "Push version bump: ${{ steps.bump-version.outputs.WAVETERM_VERSION }}" - if: github.ref_protected - run: | - # Create a new commit for the package version bump in package.json - export VERSION=${{ steps.bump-version.outputs.WAVETERM_VERSION }} - export MESSAGE="chore: bump package version to $VERSION" - export FILE=package.json - export BRANCH=${{github.ref_name}} - export SHA=$( git rev-parse $BRANCH:$FILE ) - export CONTENT=$( base64 -i $FILE ) - gh api --method PUT /repos/:owner/:repo/contents/$FILE \ - --field branch="$BRANCH" \ - --field message="$MESSAGE" \ - --field content="$CONTENT" \ - --field sha="$SHA" - - # Fetch the new commit and create a tag referencing it - git fetch - export TAG_SHA=$( git rev-parse origin/$BRANCH ) - gh api --method POST /repos/:owner/:repo/git/refs \ - --field ref="refs/tags/v$VERSION" \ - --field sha="$TAG_SHA" - shell: bash - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 60930e9c0f..0000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,137 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: ["main"] - paths: - - "**/*.go" - - "**/*.ts" - - "**/*.tsx" - pull_request: - branches: ["main"] - paths: - - "**/*.go" - - "**/*.ts" - - "**/*.tsx" - types: - - opened - - synchronize - - reopened - - ready_for_review - schedule: - - cron: "36 5 * * 5" - -env: - NODE_VERSION: 22 - GO_VERSION: "1.24" - -jobs: - analyze: - name: Analyze - # Runner size impacts CodeQL analysis time. To learn more, please see: - # - https://gh.io/recommended-hardware-resources-for-running-codeql - # - https://gh.io/supported-runners-and-hardware-resources - # - https://gh.io/using-larger-runners - # Consider using larger runners for possible analysis time improvements. - if: github.event.pull_request.draft == false - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: ["go", "javascript-typescript"] - # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] - # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both - # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/setup-node@v6 - with: - node-version: ${{env.NODE_VERSION}} - cache: npm - cache-dependency-path: package-lock.json - - uses: nick-fields/retry@v3 - name: npm ci - with: - command: npm ci --no-audit --no-fund - retry_on: error - max_attempts: 3 - timeout_minutes: 5 - - - name: Setup Go - uses: actions/setup-go@v6 - with: - go-version: ${{env.GO_VERSION}} - cache-dependency-path: | - go.sum - # We use Zig instead of glibc for cgo compilation as it is more-easily statically linked - - name: Setup Zig - run: sudo snap install zig --classic --beta - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v4 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - name: Generate bindings - run: task generate - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild (not Go) - if: matrix.language != 'go' - uses: github/codeql-action/autobuild@v4 - - - name: Build (Go only) - if: matrix.language == 'go' - run: | - task build:server - task build:wsh - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml deleted file mode 100644 index 2a093ff357..0000000000 --- a/.github/workflows/copilot-setup-steps.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Copilot Setup Steps - -on: - workflow_dispatch: - push: - paths: [.github/workflows/copilot-setup-steps.yml] - pull_request: - paths: [.github/workflows/copilot-setup-steps.yml] - -env: - GO_VERSION: "1.24" - NODE_VERSION: 22 - -jobs: - copilot-setup-steps: - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - uses: actions/checkout@v5 - - # Go + Node versions match your helper - - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - cache-dependency-path: go.sum - - - uses: actions/setup-node@v6 - with: - node-version: ${{ env.NODE_VERSION }} - cache: npm - cache-dependency-path: package-lock.json - - # Zig is used by your Linux CGO builds (kept available, but we won't build here) - - uses: mlugg/setup-zig@v2 - - # Task CLI for your Taskfile - - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - # Git HTTPS so deps resolve non-interactively - - name: Force git deps to HTTPS - run: | - git config --global url.https://github.com/.insteadof ssh://git@github.com/ - git config --global url.https://github.com/.insteadof git@github.com: - - # Warm caches only (no builds) - - uses: nick-fields/retry@v3 - name: npm ci - with: - command: npm ci --no-audit --no-fund - retry_on: error - max_attempts: 3 - timeout_minutes: 5 - env: - GIT_ASKPASS: "echo" - GIT_TERMINAL_PROMPT: "0" - - - name: Pre-fetch Go modules - run: go mod download diff --git a/.github/workflows/deploy-docsite.yml b/.github/workflows/deploy-docsite.yml deleted file mode 100644 index b4539f32f8..0000000000 --- a/.github/workflows/deploy-docsite.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Docsite and Storybook CI/CD - -run-name: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'Build and Deploy' || 'Test Build' }} Docsite and Storybook - -env: - NODE_VERSION: 22 - -on: - push: - branches: - - main - workflow_dispatch: - # Also run any time a PR is opened targeting the docs or storybook resources - pull_request: - branches: - - main - types: - - opened - - synchronize - - reopened - - ready_for_review - paths: - - "docs/**" - - "storybook/**" - - "**/*.story.*" - - "**/*.stories.*" - - ".github/workflows/deploy-docsite.yml" - - "Taskfile.yml" - -jobs: - build: - name: Build Docsite - runs-on: ubuntu-latest - if: github.event.pull_request.draft == false - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - uses: actions/setup-node@v6 - with: - node-version: ${{env.NODE_VERSION}} - cache: npm - cache-dependency-path: package-lock.json - - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: nick-fields/retry@v3 - name: npm ci - with: - command: npm ci --no-audit --no-fund - retry_on: error - max_attempts: 3 - timeout_minutes: 5 - - name: Build docsite - run: task docsite:build:public - - name: Upload Build Artifact - # Only upload the build artifact when pushed to the main branch - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: actions/upload-pages-artifact@v3 - with: - path: docs/build - deploy: - name: Deploy to GitHub Pages - # Only deploy when pushed to the main branch - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - needs: build - # Grant GITHUB_TOKEN the permissions required to make a Pages deployment - permissions: - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source - - # Deploy to the github-pages environment - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/merge-gatekeeper.yml b/.github/workflows/merge-gatekeeper.yml deleted file mode 100644 index d3defadca8..0000000000 --- a/.github/workflows/merge-gatekeeper.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Merge Gatekeeper - -on: - pull_request_target: - branches: - - main - - master - types: - - opened - - synchronize - - reopened - - ready_for_review - -jobs: - merge-gatekeeper: - runs-on: ubuntu-latest - if: github.event.pull_request.draft == false - # Restrict permissions of the GITHUB_TOKEN. - # Docs: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs - permissions: - checks: read - statuses: read - steps: - - name: Run Merge Gatekeeper - # NOTE: v1 is updated to reflect the latest v1.x.y. Please use any tag/branch that suits your needs: - # https://github.com/upsidr/merge-gatekeeper/tags - # https://github.com/upsidr/merge-gatekeeper/branches - uses: upsidr/merge-gatekeeper@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ignored: Build for TestDriver.ai, TestDriver.ai Run, Analyze (go), Analyze (javascript-typescript), License Compliance, CodeRabbit diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml deleted file mode 100644 index 784a2fbec4..0000000000 --- a/.github/workflows/publish-release.yml +++ /dev/null @@ -1,100 +0,0 @@ -# Workflow to copy artifacts from the staging bucket to the release bucket when a new GitHub Release is published. - -name: Publish Release -run-name: Publish ${{ github.ref_name }} -on: - release: - types: [published] -jobs: - publish-s3: - name: Publish to Releases - if: ${{ startsWith(github.ref, 'refs/tags/') }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Publish from staging - run: "task artifacts:publish:${{ github.ref_name }}" - env: - AWS_ACCESS_KEY_ID: "${{ secrets.PUBLISHER_KEY_ID }}" - AWS_SECRET_ACCESS_KEY: "${{ secrets.PUBLISHER_KEY_SECRET }}" - AWS_DEFAULT_REGION: us-west-2 - shell: bash - publish-snap-amd64: - name: Publish AMD64 Snap - if: ${{ startsWith(github.ref, 'refs/tags/') }} - needs: [publish-s3] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Snapcraft - run: sudo snap install snapcraft --classic - shell: bash - - name: Download Snap from Release - uses: robinraju/release-downloader@v1 - with: - tag: ${{github.ref_name}} - fileName: "*amd64.snap" - - name: Publish to Snapcraft - run: "task artifacts:snap:publish:${{ github.ref_name }}" - env: - SNAPCRAFT_STORE_CREDENTIALS: "${{secrets.SNAPCRAFT_LOGIN_CREDS}}" - shell: bash - publish-snap-arm64: - name: Publish ARM64 Snap - if: ${{ startsWith(github.ref, 'refs/tags/') }} - needs: [publish-s3] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Snapcraft - run: sudo snap install snapcraft --classic - shell: bash - - name: Download Snap from Release - uses: robinraju/release-downloader@v1 - with: - tag: ${{github.ref_name}} - fileName: "*arm64.snap" - - name: Publish to Snapcraft - run: "task artifacts:snap:publish:${{ github.ref_name }}" - env: - SNAPCRAFT_STORE_CREDENTIALS: "${{secrets.SNAPCRAFT_LOGIN_CREDS}}" - shell: bash - bump-winget: - name: Submit WinGet PR - if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, 'beta') }} - needs: [publish-s3] - runs-on: windows-latest - steps: - - uses: actions/checkout@v5 - - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install winget - uses: Cyberboss/install-winget@v1 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install wingetcreate - run: winget install -e --silent --accept-package-agreements --accept-source-agreements wingetcreate - shell: pwsh - - name: Submit WinGet version bump - run: "task artifacts:winget:publish:${{ github.ref_name }}" - env: - GITHUB_TOKEN: ${{ secrets.WINGET_BUMP_PAT }} - shell: pwsh diff --git a/.github/workflows/testdriver-build.yml b/.github/workflows/testdriver-build.yml deleted file mode 100644 index 46cb473bf3..0000000000 --- a/.github/workflows/testdriver-build.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: TestDriver.ai Build - -on: - push: - branches: - - main - tags: - - "v[0-9]+.[0-9]+.[0-9]+*" - pull_request: - # branches: - # - main - # paths-ignore: - # - "docs/**" - # - ".storybook/**" - # - ".vscode/**" - # - ".editorconfig" - # - ".gitignore" - # - ".prettierrc" - # - ".eslintrc.js" - # - "**/*.md" - types: - - opened - - synchronize - - reopened - - ready_for_review - schedule: - - cron: 0 21 * * * - workflow_dispatch: null - -env: - GO_VERSION: "1.24" - NODE_VERSION: 22 - -permissions: - contents: read # To allow the action to read repository contents - pull-requests: write # To allow the action to create/update pull request comments - -jobs: - build_and_upload: - name: Build for TestDriver.ai - runs-on: windows-latest - if: github.event.pull_request.draft == false - steps: - - uses: actions/checkout@v5 - - # General build dependencies - - uses: actions/setup-go@v6 - with: - go-version: ${{env.GO_VERSION}} - - uses: actions/setup-node@v6 - with: - node-version: ${{env.NODE_VERSION}} - cache: npm - cache-dependency-path: package-lock.json - - uses: nick-fields/retry@v3 - name: npm ci - with: - command: npm ci --no-audit --no-fund - retry_on: error - max_attempts: 3 - timeout_minutes: 5 - - name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Zig - uses: mlugg/setup-zig@v2 - - - name: Build - run: task package - env: - USE_SYSTEM_FPM: true # Ensure that the installed version of FPM is used rather than the bundled one. - CSC_IDENTITY_AUTO_DISCOVERY: false # disable codesign - shell: powershell # electron-builder's Windows code signing package has some compatibility issues with pwsh, so we need to use Windows Powershell - - # Upload .exe as an artifact - - name: Upload .exe artifact - id: upload - uses: actions/upload-artifact@v4 - with: - name: windows-exe - path: make/*.exe diff --git a/.github/workflows/testdriver.yml b/.github/workflows/testdriver.yml deleted file mode 100644 index 1306e87773..0000000000 --- a/.github/workflows/testdriver.yml +++ /dev/null @@ -1,141 +0,0 @@ -name: TestDriver.ai Run - -on: - workflow_run: - workflows: ["TestDriver.ai Build"] - types: - - completed - -env: - GO_VERSION: "1.24" - NODE_VERSION: 22 - -permissions: - contents: read - statuses: write - -jobs: - context: - runs-on: ubuntu-22.04 - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Dump job context - env: - JOB_CONTEXT: ${{ toJson(job) }} - run: echo "$JOB_CONTEXT" - - name: Dump steps context - env: - STEPS_CONTEXT: ${{ toJson(steps) }} - run: echo "$STEPS_CONTEXT" - - name: Dump runner context - env: - RUNNER_CONTEXT: ${{ toJson(runner) }} - run: echo "$RUNNER_CONTEXT" - - name: Dump strategy context - env: - STRATEGY_CONTEXT: ${{ toJson(strategy) }} - run: echo "$STRATEGY_CONTEXT" - - name: Dump matrix context - env: - MATRIX_CONTEXT: ${{ toJson(matrix) }} - run: echo "$MATRIX_CONTEXT" - run_testdriver: - name: Run TestDriver.ai - runs-on: windows-latest - if: github.event.workflow_run.conclusion == 'success' - steps: - - uses: testdriverai/action@main - id: testdriver - env: - FORCE_COLOR: "3" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - key: ${{ secrets.DASHCAM_API }} - prerun: | - $headers = @{ - Authorization = "token ${{ secrets.GITHUB_TOKEN }}" - } - - $downloadFolder = "./download" - $artifactFileName = "waveterm.exe" - $artifactFilePath = "$downloadFolder/$artifactFileName" - - Write-Host "Starting the artifact download process..." - - # Create the download directory if it doesn't exist - if (-not (Test-Path -Path $downloadFolder)) { - Write-Host "Creating download folder..." - mkdir $downloadFolder - } else { - Write-Host "Download folder already exists." - } - - # Fetch the artifact upload URL - Write-Host "Fetching the artifact upload URL..." - $artifactUrl = (Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts" -Headers $headers).artifacts[0].archive_download_url - - if ($artifactUrl) { - Write-Host "Artifact URL successfully fetched: $artifactUrl" - } else { - Write-Error "Failed to fetch the artifact URL." - exit 1 - } - - # Download the artifact (zipped file) - Write-Host "Starting artifact download..." - $artifactZipPath = "$env:TEMP\artifact.zip" - try { - Invoke-WebRequest -Uri $artifactUrl ` - -Headers $headers ` - -OutFile $artifactZipPath ` - -MaximumRedirection 5 - - Write-Host "Artifact downloaded successfully to $artifactZipPath" - } catch { - Write-Error "Error downloading artifact: $_" - exit 1 - } - - # Unzip the artifact - $artifactUnzipPath = "$env:TEMP\artifact" - Write-Host "Unzipping the artifact to $artifactUnzipPath..." - try { - Expand-Archive -Path $artifactZipPath -DestinationPath $artifactUnzipPath -Force - Write-Host "Artifact unzipped successfully to $artifactUnzipPath" - } catch { - Write-Error "Failed to unzip the artifact: $_" - exit 1 - } - - # Find the installer or app executable - $artifactInstallerPath = Get-ChildItem -Path $artifactUnzipPath -Filter *.exe -Recurse | Select-Object -First 1 - - if ($artifactInstallerPath) { - Write-Host "Executable file found: $($artifactInstallerPath.FullName)" - } else { - Write-Error "Executable file not found. Exiting." - exit 1 - } - - # Run the installer and log the result - Write-Host "Running the installer: $($artifactInstallerPath.FullName)..." - try { - Start-Process -FilePath $artifactInstallerPath.FullName -Wait - Write-Host "Installer ran successfully." - } catch { - Write-Error "Failed to run the installer: $_" - exit 1 - } - - # Optional: If the app executable is different from the installer, find and launch it - $wavePath = Join-Path $env:USERPROFILE "AppData\Local\Programs\waveterm\Wave.exe" - - Write-Host "Launching the application: $($wavePath)" - Start-Process -FilePath $wavePath - Write-Host "Application launched." - - prompt: | - 1. /run testdriver/onboarding.yml