Add icon for the cli #311
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: 10.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-prerelease.$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 | |
| if-no-files-found: error | |
| - name: Upload CLI binaries | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-binaries | |
| path: artifacts/cli/ | |
| if-no-files-found: error | |
| - name: Upload npm package | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: npm-package | |
| path: artifacts/*.tgz | |
| if-no-files-found: error | |
| - name: Upload MSIX packages | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: msix-packages | |
| path: artifacts/msix-packages/*.msix | |
| if-no-files-found: error |