fix: fix windows bundle random failure and optimise canary build (#7105)
This commit is contained in:
@@ -65,7 +65,6 @@ jobs:
|
|||||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.ref }}
|
ref: ${{ inputs.ref }}
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Update version in Cargo.toml
|
- name: Update version in Cargo.toml
|
||||||
if: ${{ inputs.version != '' }}
|
if: ${{ inputs.version != '' }}
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
# Only pass ref if it's explicitly set, otherwise let checkout action use its default behavior
|
# Only pass ref if it's explicitly set, otherwise let checkout action use its default behavior
|
||||||
ref: ${{ inputs.ref != '' && inputs.ref || '' }}
|
ref: ${{ inputs.ref != '' && inputs.ref || '' }}
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
# Update versions before build
|
# Update versions before build
|
||||||
- name: Update versions
|
- name: Update versions
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ jobs:
|
|||||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.ref }}
|
ref: ${{ inputs.ref }}
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Update versions
|
- name: Update versions
|
||||||
if: ${{ inputs.version != '' }}
|
if: ${{ inputs.version != '' }}
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ jobs:
|
|||||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.ref != '' && inputs.ref || '' }}
|
ref: ${{ inputs.ref != '' && inputs.ref || '' }}
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Configure AWS credentials
|
- name: Configure AWS credentials
|
||||||
if: inputs.signing && inputs.signing == true
|
if: inputs.signing && inputs.signing == true
|
||||||
@@ -123,6 +122,13 @@ jobs:
|
|||||||
echo "Windows-specific files copied successfully"
|
echo "Windows-specific files copied successfully"
|
||||||
fi
|
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
|
- name: Build desktop UI with npm
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
# Only pass ref if it's explicitly set, otherwise let checkout action use its default behavior
|
# Only pass ref if it's explicitly set, otherwise let checkout action use its default behavior
|
||||||
ref: ${{ inputs.ref != '' && inputs.ref || '' }}
|
ref: ${{ inputs.ref != '' && inputs.ref || '' }}
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Debug git status
|
- name: Debug git status
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ jobs:
|
|||||||
Goose*.zip
|
Goose*.zip
|
||||||
*.deb
|
*.deb
|
||||||
*.rpm
|
*.rpm
|
||||||
**/*.flatpak
|
*.flatpak
|
||||||
download_cli.sh
|
download_cli.sh
|
||||||
allowUpdates: true
|
allowUpdates: true
|
||||||
omitBody: true
|
omitBody: true
|
||||||
|
|||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user