Proper use of --manifest option in package command. #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Package | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # Required for creating releases | |
| jobs: | |
| build-and-package: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # Required for build number calculation | |
| - name: Install .NET Core | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: '24' | |
| # Run the build script which handles building, testing, versioning, npm packaging, and MSIX bundling | |
| - name: Build, test, and package | |
| id: build | |
| run: | | |
| .\scripts\build-cli.ps1 | |
| # Get version information for release tagging | |
| $versionJson = Get-Content "version.json" | ConvertFrom-Json | |
| $baseVersion = $versionJson.version | |
| $buildNumber = & ".\scripts\get-build-number.ps1" | |
| $fullVersion = "$baseVersion-build.$buildNumber" | |
| # Export for use in subsequent steps | |
| echo "version=$fullVersion" >> $env:GITHUB_OUTPUT | |
| echo "base_version=$baseVersion" >> $env:GITHUB_OUTPUT | |
| echo "build_number=$buildNumber" >> $env:GITHUB_OUTPUT | |
| # Upload all build artifacts | |
| - name: Upload test results | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: artifacts/TestResults/*.trx | |
| - name: Upload CLI binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-binaries | |
| path: artifacts/cli/ | |
| - name: Upload npm package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: npm-package | |
| path: artifacts/*.tgz | |
| # - name: Upload MSIX bundle distribution | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: msix-bundle | |
| # path: artifacts/msix-bundle/ | |
| # - name: Upload MSIX layout | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: msix-layout | |
| # path: artifacts/msix-layout/ | |
| # Prepare release assets (only on push to main) | |
| - name: Prepare Release Assets | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| run: | | |
| $version = "${{ steps.build.outputs.version }}" | |
| # # Create a zip of the MSIX bundle distribution folder | |
| # Compress-Archive -Path "artifacts\msix-bundle\*" -DestinationPath "artifacts\msix-$version.zip" -Force | |
| # Write-Host "Created msix-$version.zip" | |
| # Create a zip of the CLI binaries (both x64 and arm64) | |
| Compress-Archive -Path "artifacts\cli\*" -DestinationPath "artifacts\binaries-$version.zip" -Force | |
| Write-Host "Created binaries-$version.zip" | |
| # Create GitHub pre-release (only on push to main) | |
| - name: Create Pre-Release | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ steps.build.outputs.version }} | |
| name: Pre-release v${{ steps.build.outputs.version }} | |
| prerelease: true | |
| generate_release_notes: true | |
| body: | | |
| 🚀 **Automated Pre-release Build** | |
| Version: `${{ steps.build.outputs.version }}` | |
| Base Version: `${{ steps.build.outputs.base_version }}` | |
| Build Number: `${{ steps.build.outputs.build_number }}` | |
| Commit: `${{ github.sha }}` | |
| ## Installation Options | |
| ### 📦 Standalone CLI Binaries | |
| 1. Download `binaries-${{ steps.build.outputs.version }}.zip` | |
| 2. Extract to your desired location | |
| 3. Add to PATH or run directly: `win-x64\Winsdk.Cli.exe` or `win-arm64\Winsdk.Cli.exe` | |
| ### 📚 NPM Package (for Electron or NodeJS) | |
| ```bash | |
| npm install microsoft-winsdk-${{ steps.build.outputs.version }}.tgz | |
| ``` | |
| ## What's Included | |
| - ✅ Standalone CLI binaries (x64 and ARM64) | |
| - ✅ NPM package for NodeJS/Electron integration | |
| files: | | |
| artifacts/binaries-*.zip | |
| artifacts/*.tgz |