fix: windows build

This commit is contained in:
houseme
2025-07-21 17:45:56 +08:00
parent bebd78fbbb
commit 2a0c618f8b
+18 -17
View File
@@ -28,8 +28,8 @@ name: Build and Release
on: on:
push: push:
tags: ["*.*.*"] tags: [ "*.*.*" ]
branches: [main] branches: [ main ]
paths-ignore: paths-ignore:
- "**.md" - "**.md"
- "**.txt" - "**.txt"
@@ -45,7 +45,7 @@ on:
- ".gitignore" - ".gitignore"
- ".dockerignore" - ".dockerignore"
pull_request: pull_request:
branches: [main] branches: [ main ]
paths-ignore: paths-ignore:
- "**.md" - "**.md"
- "**.txt" - "**.txt"
@@ -153,7 +153,7 @@ jobs:
# Build RustFS binaries # Build RustFS binaries
build-rustfs: build-rustfs:
name: Build RustFS name: Build RustFS
needs: [build-check] needs: [ build-check ]
if: needs.build-check.outputs.should_build == 'true' if: needs.build-check.outputs.should_build == 'true'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
timeout-minutes: 60 timeout-minutes: 60
@@ -172,14 +172,14 @@ jobs:
target: aarch64-unknown-linux-musl target: aarch64-unknown-linux-musl
cross: true cross: true
platform: linux platform: linux
- os: ubuntu-latest # - os: ubuntu-latest
target: x86_64-unknown-linux-gnu # target: x86_64-unknown-linux-gnu
cross: false # cross: false
platform: linux # platform: linux
- os: ubuntu-latest # - os: ubuntu-latest
target: aarch64-unknown-linux-gnu # target: aarch64-unknown-linux-gnu
cross: true # cross: true
platform: linux # platform: linux
# macOS builds # macOS builds
- os: macos-latest - os: macos-latest
target: aarch64-apple-darwin target: aarch64-apple-darwin
@@ -215,6 +215,7 @@ jobs:
install-cross-tools: ${{ matrix.cross }} install-cross-tools: ${{ matrix.cross }}
- name: Download static console assets - name: Download static console assets
shell: bash
run: | run: |
mkdir -p ./rustfs/static mkdir -p ./rustfs/static
if [[ "${{ matrix.platform }}" == "windows" ]]; then if [[ "${{ matrix.platform }}" == "windows" ]]; then
@@ -450,7 +451,7 @@ jobs:
# Build summary # Build summary
build-summary: build-summary:
name: Build Summary name: Build Summary
needs: [build-check, build-rustfs] needs: [ build-check, build-rustfs ]
if: always() && needs.build-check.outputs.should_build == 'true' if: always() && needs.build-check.outputs.should_build == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -501,7 +502,7 @@ jobs:
# Create GitHub Release (only for tag pushes) # Create GitHub Release (only for tag pushes)
create-release: create-release:
name: Create GitHub Release name: Create GitHub Release
needs: [build-check, build-rustfs] needs: [ build-check, build-rustfs ]
if: startsWith(github.ref, 'refs/tags/') && needs.build-check.outputs.build_type != 'development' if: startsWith(github.ref, 'refs/tags/') && needs.build-check.outputs.build_type != 'development'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
@@ -586,7 +587,7 @@ jobs:
# Prepare and upload release assets # Prepare and upload release assets
upload-release-assets: upload-release-assets:
name: Upload Release Assets name: Upload Release Assets
needs: [build-check, build-rustfs, create-release] needs: [ build-check, build-rustfs, create-release ]
if: startsWith(github.ref, 'refs/tags/') && needs.build-check.outputs.build_type != 'development' if: startsWith(github.ref, 'refs/tags/') && needs.build-check.outputs.build_type != 'development'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
@@ -665,7 +666,7 @@ jobs:
# Update latest.json for stable releases only # Update latest.json for stable releases only
update-latest-version: update-latest-version:
name: Update Latest Version name: Update Latest Version
needs: [build-check, upload-release-assets] needs: [ build-check, upload-release-assets ]
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -714,7 +715,7 @@ jobs:
# Publish release (remove draft status) # Publish release (remove draft status)
publish-release: publish-release:
name: Publish Release name: Publish Release
needs: [build-check, create-release, upload-release-assets] needs: [ build-check, create-release, upload-release-assets ]
if: startsWith(github.ref, 'refs/tags/') && needs.build-check.outputs.build_type != 'development' if: startsWith(github.ref, 'refs/tags/') && needs.build-check.outputs.build_type != 'development'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions: