Merge pull request #994 from web3dev1337/security/pin-axios #1107
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: windows | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| profile: | |
| description: 'Build profile (release or fast)' | |
| required: false | |
| default: 'fast' | |
| type: choice | |
| options: | |
| - fast | |
| - release | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| pull_request: | |
| permissions: | |
| contents: write | |
| jobs: | |
| unit_windows: | |
| name: unit (windows) | |
| runs-on: windows-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Install | |
| run: npm ci | |
| - name: Release version consistency | |
| run: npm run release:check-version | |
| - name: Unit tests | |
| run: npm run test:unit | |
| - name: Command surface drift check | |
| run: npm run check:command-surface | |
| tauri_windows: | |
| name: tauri build (windows) | |
| if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| needs: [unit_windows] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Determine release version | |
| id: release_version | |
| run: node scripts/tauri/get-release-version.js | |
| - name: Resolve bundled Node version | |
| id: bundled_node_version | |
| shell: pwsh | |
| run: | | |
| $nodeVersion = node -p "process.version" | |
| "value=$nodeVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "src-tauri -> target" | |
| - name: Cache packaged backend production deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| src-tauri/resources/backend/node_modules | |
| src-tauri/resources/backend/.prod-install-stamp.json | |
| key: ${{ runner.os }}-tauri-backend-prod-v2-${{ steps.bundled_node_version.outputs.value }}-${{ hashFiles('.nvmrc', 'package.json', 'package-lock.json', 'scripts/tauri/prepare-backend-resources.js') }} | |
| - name: Install | |
| run: npm ci | |
| - name: Sync release versions | |
| run: npm run release:sync-version | |
| - name: Release version consistency | |
| run: npm run release:check-version | |
| - name: Determine build profile | |
| id: build_profile | |
| shell: pwsh | |
| run: | | |
| $profile = "${{ github.event.inputs.profile }}" | |
| if (-not $profile -or $profile -eq '') { $profile = 'release' } | |
| "value=$profile" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| $targetDir = if ($profile -eq 'fast') { 'fast' } else { 'release' } | |
| "target_dir=$targetDir" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append | |
| - name: Build Windows installer (Tauri) | |
| run: | | |
| node scripts/tauri/run-tauri-build.js --profile ${{ steps.build_profile.outputs.value }} | |
| - name: Upload installer artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tauri-windows-bundle | |
| if-no-files-found: error | |
| path: | | |
| src-tauri/target/${{ steps.build_profile.outputs.target_dir }}/bundle/msi/*.msi | |
| src-tauri/target/${{ steps.build_profile.outputs.target_dir }}/bundle/nsis/*.exe | |
| - name: Create GitHub Release (tags only) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Agent Workspace ${{ steps.release_version.outputs.value }} | |
| # Only one workflow should own generated release notes for a tag. | |
| generate_release_notes: true | |
| files: | | |
| src-tauri/target/${{ steps.build_profile.outputs.target_dir }}/bundle/msi/*.msi | |
| src-tauri/target/${{ steps.build_profile.outputs.target_dir }}/bundle/nsis/*.exe | |
| - name: Append release install notes (tags only) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| run: | | |
| node scripts/release/append-release-install-notes.js --tag ${{ github.ref_name }} |