commit 2d42b0f83a1dceb540d8f569fbc75cfe42fad15b Author: Lannamokia Date: Fri Aug 8 14:58:38 2025 +0800 first commit diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b4ce082 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,78 @@ +name: Build VHD Mounter + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + release: + types: [ published ] + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.0.x' + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Test + run: dotnet test --no-build --verbosity normal + continue-on-error: true + + - name: Publish Windows x64 + run: dotnet publish --configuration Release --runtime win-x64 --self-contained true --output ./publish/win-x64 + + - name: Publish Windows x86 + run: dotnet publish --configuration Release --runtime win-x86 --self-contained true --output ./publish/win-x86 + + - name: Upload Windows x64 artifacts + uses: actions/upload-artifact@v4 + with: + name: VHDMounter-win-x64 + path: ./publish/win-x64/ + + - name: Upload Windows x86 artifacts + uses: actions/upload-artifact@v4 + with: + name: VHDMounter-win-x86 + path: ./publish/win-x86/ + + - name: Create Release Assets + if: github.event_name == 'release' + run: | + Compress-Archive -Path ./publish/win-x64/* -DestinationPath VHDMounter-win-x64.zip + Compress-Archive -Path ./publish/win-x86/* -DestinationPath VHDMounter-win-x86.zip + + - name: Upload Release Assets + if: github.event_name == 'release' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./VHDMounter-win-x64.zip + asset_name: VHDMounter-win-x64.zip + asset_content_type: application/zip + + - name: Upload Release Assets x86 + if: github.event_name == 'release' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./VHDMounter-win-x86.zip + asset_name: VHDMounter-win-x86.zip + asset_content_type: application/zip \ No newline at end of file diff --git a/MainWindow.xaml b/MainWindow.xaml new file mode 100644 index 0000000..505bd77 --- /dev/null +++ b/MainWindow.xaml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +