build(deps-dev): bump ws from 8.17.1 to 8.21.0 #2215
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: Continuous Integration | |
| on: | |
| # Trigger the workflow on push or pull request, | |
| # but only for the main branch | |
| # See: https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012 | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| # Restrictive default: no permissions unless explicitly granted at the job level | |
| permissions: {} | |
| env: | |
| artifact-retention-days: 14 | |
| retention-comment: This comment will be **updated** with the data of the **last successful** build of this PR. | |
| jobs: | |
| build: | |
| name: Full Build (node ${{ matrix.node_version }}) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # Checkout repository code | |
| outputs: | |
| vsix-artifact-id: ${{ steps.upload_build_artifacts.outputs.artifact-id }} | |
| strategy: | |
| matrix: | |
| node_version: | |
| - 24.x | |
| # https://stackoverflow.com/questions/61070925/github-actions-disable-auto-cancel-when-job-fails | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ matrix.node_version }} | |
| - name: Setup pnpm | |
| # pnpm version from package.json `packageManager` field is used | |
| uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm run ci | |
| - name: upload build artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| id: upload_build_artifacts | |
| with: | |
| name: all-vsix | |
| path: | | |
| packages/*/*.vsix | |
| projects/yeoman-ui/packages/backend/*.vsix | |
| # default is 90 days; however, we want to avoid excessive storage usage... | |
| retention-days: ${{ env.artifact-retention-days }} | |
| comment: | |
| name: Post build report comment | |
| runs-on: ubuntu-latest | |
| needs: build | |
| # Same head repository means this is not a forked PR. | |
| if: > | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name == github.repository && | |
| needs.build.result == 'success' | |
| permissions: | |
| pull-requests: write # Create/update PR build report comments for same-repository PRs | |
| issues: write # Required by peter-evans/create-or-update-comment to write comments via the Issues API | |
| steps: | |
| - name: Find PR Comment | |
| uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 | |
| id: find-pr-comment | |
| with: | |
| issue-number: ${{ github.event.number }} | |
| comment-author: "github-actions[bot]" | |
| body-includes: ${{ env.retention-comment }} | |
| - name: Create / Update PR Comment | |
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 | |
| env: | |
| HEAD_SHA: ${{ github.sha }} | |
| JOB_PATH: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| ARTIFACT_ID: ${{ needs.build.outputs.vsix-artifact-id }} | |
| with: | |
| edit-mode: replace | |
| issue-number: ${{ github.event.number }} | |
| comment-id: ${{ steps.find-pr-comment.outputs.comment-id }} | |
| body: | | |
| ## Build Report | |
| [![badge]]($JOB_PATH) | |
| Please note: | |
| 1. Files only stay for around ${{ env.artifact-retention-days }} days! | |
| 2. ${{ env.retention-comment }} | |
| | Name | Link | | |
| |------------|--------------------------------------------------------| | |
| | Commit | ${{ env.HEAD_SHA }} | | |
| | Logs | ${{ env.JOB_PATH }} | | |
| | VSIX Files | ${{ env.JOB_PATH }}/artifacts/${{ env.ARTIFACT_ID }} | | |
| [badge]: https://img.shields.io/badge/Build-Success!-3fb950?logo=github&style=for-the-badge |