From 53a15c65dd6ac45b6a46be1d6784ef335ab88c2c Mon Sep 17 00:00:00 2001 From: Lifei Zhou Date: Tue, 10 Feb 2026 16:23:45 +1100 Subject: [PATCH] fix: fix windows bundle random failure and optimise canary build (#7105) --- .github/workflows/build-cli.yml | 1 - .github/workflows/bundle-desktop-intel.yml | 1 - .github/workflows/bundle-desktop-linux.yml | 1 - .github/workflows/bundle-desktop-windows.yml | 8 +- .github/workflows/bundle-desktop.yml | 1 - .github/workflows/canary.yml | 2 +- .github/workflows/nightly.yml | 129 ------------------- 7 files changed, 8 insertions(+), 135 deletions(-) delete mode 100644 .github/workflows/nightly.yml diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml index e434f51910b8..81738336e5d3 100644 --- a/.github/workflows/build-cli.yml +++ b/.github/workflows/build-cli.yml @@ -65,7 +65,6 @@ jobs: uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: ref: ${{ inputs.ref }} - fetch-depth: 0 - name: Update version in Cargo.toml if: ${{ inputs.version != '' }} diff --git a/.github/workflows/bundle-desktop-intel.yml b/.github/workflows/bundle-desktop-intel.yml index 6b48b6aca0ec..7fb6fdb74bbe 100644 --- a/.github/workflows/bundle-desktop-intel.yml +++ b/.github/workflows/bundle-desktop-intel.yml @@ -48,7 +48,6 @@ jobs: with: # Only pass ref if it's explicitly set, otherwise let checkout action use its default behavior ref: ${{ inputs.ref != '' && inputs.ref || '' }} - fetch-depth: 0 # Update versions before build - name: Update versions diff --git a/.github/workflows/bundle-desktop-linux.yml b/.github/workflows/bundle-desktop-linux.yml index cae4cf052f93..bf2ca021ad62 100644 --- a/.github/workflows/bundle-desktop-linux.yml +++ b/.github/workflows/bundle-desktop-linux.yml @@ -28,7 +28,6 @@ jobs: uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: ref: ${{ inputs.ref }} - fetch-depth: 0 - name: Update versions if: ${{ inputs.version != '' }} diff --git a/.github/workflows/bundle-desktop-windows.yml b/.github/workflows/bundle-desktop-windows.yml index 08f9090672e9..e82ab3d5ad4b 100644 --- a/.github/workflows/bundle-desktop-windows.yml +++ b/.github/workflows/bundle-desktop-windows.yml @@ -41,7 +41,6 @@ jobs: uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: ref: ${{ inputs.ref != '' && inputs.ref || '' }} - fetch-depth: 0 - name: Configure AWS credentials if: inputs.signing && inputs.signing == true @@ -123,6 +122,13 @@ jobs: echo "Windows-specific files copied successfully" fi + - name: Force GitHub HTTPS for npm git dependencies + shell: bash + run: | + git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" + git config --global url."https://github.com/".insteadOf "git@github.com:" + git config --global url."https://github.com/".insteadOf "git+ssh://git@github.com/" + - name: Build desktop UI with npm shell: bash env: diff --git a/.github/workflows/bundle-desktop.yml b/.github/workflows/bundle-desktop.yml index 18e3be6fbb68..fb13e6eecaa7 100644 --- a/.github/workflows/bundle-desktop.yml +++ b/.github/workflows/bundle-desktop.yml @@ -76,7 +76,6 @@ jobs: with: # Only pass ref if it's explicitly set, otherwise let checkout action use its default behavior ref: ${{ inputs.ref != '' && inputs.ref || '' }} - fetch-depth: 0 - name: Debug git status run: | diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index f192006c2942..050e36097441 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -119,7 +119,7 @@ jobs: Goose*.zip *.deb *.rpm - **/*.flatpak + *.flatpak download_cli.sh allowUpdates: true omitBody: true diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index 5a0fa68fb1a5..000000000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,129 +0,0 @@ -# A release from main. Automatically triggered at midnight US Eastern. - -name: Nightly Build - -on: - schedule: - # Run at midnight US Eastern (0500 UTC) - - cron: '0 5 * * *' - workflow_dispatch: # Allow manual triggering - inputs: - branch: - description: 'Branch to build from' - required: false - default: 'main' - - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - prepare-version: - name: Prepare Version - runs-on: ubuntu-latest - outputs: - version: ${{ steps.set-version.outputs.version }} - commit_sha: ${{ steps.get-commit.outputs.commit_sha }} - steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - ref: main # Ensure we're building from latest main - fetch-depth: 0 - - - name: Get commit info - id: get-commit - run: | - echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT - echo "Building from commit: $(git rev-parse HEAD)" - echo "Latest commit: $(git log -1 --oneline)" - - - name: Generate a nightly version - id: set-version - run: | - # Extract the version from Cargo.toml and add nightly tag with date and short commit - VERSION=$(grep '^version\s*=' Cargo.toml | head -n 1 | cut -d\" -f2) - DATE=$(date -u +%Y%m%d) - SHORT_SHA=$(git rev-parse --short HEAD) - VERSION="${VERSION}-nightly.${DATE}.${SHORT_SHA}" - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "Generated version: $VERSION" - - build-cli: - needs: [prepare-version] - uses: ./.github/workflows/build-cli.yml - with: - version: ${{ needs.prepare-version.outputs.version }} - - install-script: - name: Upload Install Script - runs-on: ubuntu-latest - needs: [build-cli] - steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 - with: - name: download_cli.sh - path: download_cli.sh - - bundle-desktop: - needs: [prepare-version] - uses: ./.github/workflows/bundle-desktop.yml - permissions: - id-token: write - contents: read - with: - version: ${{ needs.prepare-version.outputs.version }} - signing: true - secrets: - OSX_CODESIGN_ROLE: ${{ secrets.OSX_CODESIGN_ROLE }} - - bundle-desktop-linux: - needs: [prepare-version] - uses: ./.github/workflows/bundle-desktop-linux.yml - with: - version: ${{ needs.prepare-version.outputs.version }} - - bundle-desktop-windows: - needs: [prepare-version] - uses: ./.github/workflows/bundle-desktop-windows.yml - with: - version: ${{ needs.prepare-version.outputs.version }} - signing: true - secrets: - WINDOW_SIGNING_ROLE: ${{ secrets.WINDOW_SIGNING_ROLE }} - WINDOW_SIGNING_ROLE_TAG: ${{ secrets.WINDOW_SIGNING_ROLE_TAG }} - WINDOWS_CODESIGN_CERTIFICATE: ${{ secrets.WINDOWS_CODESIGN_CERTIFICATE }} - - release: - name: Release - runs-on: ubuntu-latest - needs: [prepare-version, build-cli, install-script, bundle-desktop, bundle-desktop-linux, bundle-desktop-windows] - permissions: - contents: write - steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - - name: Download all artifacts - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 - with: - merge-multiple: true - - # Create/update the nightly release - - name: Release nightly - uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0 - with: - tag: ${{ needs.prepare-version.outputs.version }} - name: "Nightly ${{ needs.prepare-version.outputs.version }}" - token: ${{ secrets.GITHUB_TOKEN }} - artifacts: | - goose-*.tar.bz2 - Goose*.zip - *.deb - *.rpm - **/*.flatpak - download_cli.sh - allowUpdates: true - omitBody: true - prerelease: true - makeLatest: false