vuejs/core

9 workflows · maturity 33% · 5 patterns · GitHub ↗

Security 16.67/100

Practices

○ Matrix✓ Permissions○ Security scan○ AI review✓ Cache○ Concurrency✓ Reusable workflows

Detected patterns

Security dimensions

permissions
16.7
security scan
0
supply chain
0
secret handling
0
harden runner
0

Workflows (9)

autofix perms .github/workflows/autofix.yml
Triggers
pull_request
Runs on
ubuntu-latest
Jobs
autofix
Actions
pnpm/action-setup, autofix-ci/action
Commands
  • pnpm install
  • pnpm run lint --fix
  • pnpm run format
View raw YAML
name: autofix.ci

on:
  pull_request:
permissions:
  contents: read

jobs:
  autofix:
    runs-on: ubuntu-latest
    env:
      PUPPETEER_SKIP_DOWNLOAD: 'true'
    steps:
      - uses: actions/checkout@v6

      - name: Install pnpm
        uses: pnpm/action-setup@v5.0.0

      - name: Install Node.js
        uses: actions/setup-node@v6
        with:
          node-version-file: '.node-version'
          registry-url: 'https://registry.npmjs.org'
          cache: 'pnpm'

      - run: pnpm install

      - name: Run eslint
        run: pnpm run lint --fix

      - name: Run prettier
        run: pnpm run format

      - uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8
ci .github/workflows/ci.yml
Triggers
push, pull_request
Runs on
ubuntu-latest
Jobs
test, continuous-release
Actions
pnpm/action-setup
Commands
  • pnpm install
  • pnpm build --withTypes
  • pnpx pkg-pr-new publish --compact --pnpm './packages/*' --packageManager=pnpm,npm,yarn
View raw YAML
name: 'ci'
on:
  push:
    branches:
      - '**'
    tags:
      - '!**'
  pull_request:
    branches:
      - main
      - minor

jobs:
  test:
    if: ${{ ! startsWith(github.event.head_commit.message, 'release:') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) }}
    uses: ./.github/workflows/test.yml

  continuous-release:
    if: github.repository == 'vuejs/core'
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install pnpm
        uses: pnpm/action-setup@v5

      - name: Install Node.js
        uses: actions/setup-node@v6
        with:
          node-version-file: '.node-version'
          registry-url: 'https://registry.npmjs.org'
          cache: 'pnpm'

      - name: Install deps
        run: pnpm install

      - name: Build
        run: pnpm build --withTypes

      - name: Release
        run: pnpx pkg-pr-new publish --compact --pnpm './packages/*' --packageManager=pnpm,npm,yarn
close-cant-reproduce-issues perms .github/workflows/close-cant-reproduce-issues.yml
Triggers
schedule
Runs on
ubuntu-latest
Jobs
close-issues
Actions
actions-cool/issues-helper
View raw YAML
name: Auto close issues with "can't reproduce" label

on:
  schedule:
    - cron: '0 0 * * *'

permissions:
  issues: write

jobs:
  close-issues:
    if: github.repository == 'vuejs/core'
    runs-on: ubuntu-latest
    steps:
      - name: can't reproduce
        uses: actions-cool/issues-helper@v3
        with:
          actions: 'close-issues'
          token: ${{ secrets.GITHUB_TOKEN }}
          labels: "can't reproduce"
          inactive-day: 3
ecosystem-ci-trigger .github/workflows/ecosystem-ci-trigger.yml
Triggers
issue_comment
Runs on
ubuntu-latest
Jobs
trigger
View raw YAML
name: ecosystem-ci trigger

on:
  issue_comment:
    types: [created]

jobs:
  trigger:
    runs-on: ubuntu-latest
    if: github.repository == 'vuejs/core' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
    steps:
      - name: Check user permission
        uses: actions/github-script@v8
        with:
          script: |
            const user = context.payload.sender.login
            console.log(`Validate user: ${user}`)

            let isVuejsMember = false
            try {
              const { status } = await github.rest.orgs.checkMembershipForUser({
                org: 'vuejs',
                username: user
              });

              isVuejsMember = (status === 204)
            } catch (e) {}

            if (isVuejsMember) {
              console.log('Allowed')
              await github.rest.reactions.createForIssueComment({
                owner: context.repo.owner,
                repo: context.repo.repo,
                comment_id: context.payload.comment.id,
                content: '+1',
              })
            } else {
              console.log('Not allowed')
              await github.rest.reactions.createForIssueComment({
                owner: context.repo.owner,
                repo: context.repo.repo,
                comment_id: context.payload.comment.id,
                content: '-1',
              })
              throw new Error('not allowed')
            }
      - name: Get PR info
        uses: actions/github-script@v8
        id: get-pr-data
        with:
          script: |
            console.log(`Get PR info: ${context.repo.owner}/${context.repo.repo}#${context.issue.number}`)
            const { data: pr } = await github.rest.pulls.get({
              owner: context.repo.owner,
              repo: context.repo.repo,
              pull_number: context.issue.number
            })
            return {
              num: context.issue.number,
              branchName: pr.head.ref,
              repo: pr.head.repo.full_name,
              commit: pr.head.sha
            }
      - name: Trigger run
        uses: actions/github-script@v8
        id: trigger
        env:
          COMMENT: ${{ github.event.comment.body }}
        with:
          github-token: ${{ secrets.ECOSYSTEM_CI_ACCESS_TOKEN }}
          result-encoding: string
          script: |
            const comment = process.env.COMMENT.trim()
            const prData = ${{ steps.get-pr-data.outputs.result }}

            const suite = comment.replace(/^\/ecosystem-ci run/, '').trim()

            await github.rest.actions.createWorkflowDispatch({
              owner: context.repo.owner,
              repo: 'ecosystem-ci',
              workflow_id: 'ecosystem-ci-from-pr.yml',
              ref: 'main',
              inputs: {
                prNumber: '' + prData.num,
                branchName: prData.branchName,
                repo: prData.repo,
                suite: suite === '' ? '-' : suite,
                commit: prData.commit
              }
            })
lock-closed-issues perms .github/workflows/lock-closed-issues.yml
Triggers
schedule
Runs on
ubuntu-latest
Jobs
action
Actions
dessant/lock-threads
View raw YAML
name: Lock Closed Issues

on:
  schedule:
    - cron: '0 0 * * *'

permissions:
  issues: write

jobs:
  action:
    if: github.repository == 'vuejs/core'
    runs-on: ubuntu-latest
    steps:
      - uses: dessant/lock-threads@v6
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          issue-inactive-days: '14'
          issue-lock-reason: ''
          process-only: 'issues'
release .github/workflows/release.yml
Triggers
push
Runs on
ubuntu-latest
Jobs
test, release
Actions
pnpm/action-setup, yyx990803/release-tag
Commands
  • pnpm install
  • npm i -g npm@latest
  • pnpm release --publishOnly
View raw YAML
name: Release

on:
  push:
    tags:
      - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
  test:
    uses: ./.github/workflows/test.yml

  release:
    # prevents this action from running on forks
    if: github.repository == 'vuejs/core'
    needs: [test]
    runs-on: ubuntu-latest
    permissions:
      contents: write
      id-token: write
    # Use Release environment for deployment protection
    environment: Release
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Install pnpm
        uses: pnpm/action-setup@v5

      - name: Install Node.js
        uses: actions/setup-node@v6
        with:
          node-version-file: '.node-version'
          registry-url: 'https://registry.npmjs.org'
          cache: 'pnpm'

      - name: Install deps
        run: pnpm install

      - name: Update npm
        run: npm i -g npm@latest

      - name: Build and publish
        id: publish
        run: |
          pnpm release --publishOnly

      - name: Create GitHub release
        id: release_tag
        uses: yyx990803/release-tag@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          body: |
            For stable releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/main/CHANGELOG.md) for details.
            For pre-releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/minor/CHANGELOG.md) of the `minor` branch.
size-data perms .github/workflows/size-data.yml
Triggers
push, pull_request
Runs on
ubuntu-latest
Jobs
upload
Actions
pnpm/action-setup
Commands
  • pnpm install
  • pnpm run size
  • echo ${{ github.event.number }} > ./temp/size/number.txt echo ${{ github.base_ref }} > ./temp/size/base.txt
View raw YAML
name: size data

on:
  push:
    branches:
      - main
      - minor
  pull_request:
    branches:
      - main
      - minor

permissions:
  contents: read

env:
  PUPPETEER_SKIP_DOWNLOAD: 'true'

jobs:
  upload:
    if: github.repository == 'vuejs/core'
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6

      - name: Install pnpm
        uses: pnpm/action-setup@v5.0.0

      - name: Install Node.js
        uses: actions/setup-node@v6
        with:
          node-version-file: '.node-version'
          cache: pnpm

      - name: Install dependencies
        run: pnpm install

      - run: pnpm run size

      - name: Save PR number & base branch
        if: ${{github.event_name == 'pull_request'}}
        run: |
          echo ${{ github.event.number }} > ./temp/size/number.txt
          echo ${{ github.base_ref }} > ./temp/size/base.txt

      - name: Upload Size Data
        uses: actions/upload-artifact@v7
        with:
          name: size-data
          path: temp/size
size-report perms .github/workflows/size-report.yml
Triggers
workflow_run
Runs on
ubuntu-latest
Jobs
size-report
Actions
pnpm/action-setup, dawidd6/action-download-artifact, juliangruber/read-file-action, juliangruber/read-file-action, dawidd6/action-download-artifact, juliangruber/read-file-action, actions-cool/maintain-one-comment
Commands
  • pnpm install
  • node scripts/size-report.js > size-report.md
View raw YAML
name: size report

on:
  workflow_run:
    workflows: ['size data']
    types:
      - completed

permissions:
  contents: read
  pull-requests: write
  issues: write

env:
  PUPPETEER_SKIP_DOWNLOAD: 'true'

jobs:
  size-report:
    runs-on: ubuntu-latest
    if: >
      github.repository == 'vuejs/core' &&
      github.event.workflow_run.event == 'pull_request' &&
      github.event.workflow_run.conclusion == 'success'
    steps:
      - uses: actions/checkout@v6

      - name: Install pnpm
        uses: pnpm/action-setup@v5.0.0

      - name: Install Node.js
        uses: actions/setup-node@v6
        with:
          node-version-file: '.node-version'
          cache: pnpm

      - name: Install dependencies
        run: pnpm install

      - name: Download Size Data
        uses: dawidd6/action-download-artifact@v19
        with:
          name: size-data
          run_id: ${{ github.event.workflow_run.id }}
          path: temp/size

      - name: Read PR Number
        id: pr-number
        uses: juliangruber/read-file-action@v1
        with:
          path: temp/size/number.txt

      - name: Read base branch
        id: pr-base
        uses: juliangruber/read-file-action@v1
        with:
          path: temp/size/base.txt

      - name: Download Previous Size Data
        uses: dawidd6/action-download-artifact@v19
        with:
          branch: ${{ steps.pr-base.outputs.content }}
          workflow: size-data.yml
          event: push
          name: size-data
          path: temp/size-prev
          if_no_artifact_found: warn

      - name: Prepare report
        run: node scripts/size-report.js > size-report.md

      - name: Read Size Report
        id: size-report
        uses: juliangruber/read-file-action@v1
        with:
          path: ./size-report.md

      - name: Create Comment
        uses: actions-cool/maintain-one-comment@v3
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          number: ${{ steps.pr-number.outputs.content }}
          body: |
            ${{ steps.size-report.outputs.content }}
            <!-- VUE_CORE_SIZE -->
          body-include: '<!-- VUE_CORE_SIZE -->'
test perms .github/workflows/test.yml
Triggers
workflow_call
Runs on
ubuntu-latest, windows-latest, ubuntu-latest, ubuntu-latest
Jobs
unit-test, unit-test-windows, e2e-test, lint-and-test-dts
Actions
pnpm/action-setup, pnpm/action-setup, pnpm/action-setup, pnpm/action-setup
Commands
  • pnpm install
  • pnpm run test-unit
  • pnpm install
  • pnpm run test-unit compiler
  • pnpm run test-unit server-renderer
  • pnpm install
  • node node_modules/puppeteer/install.mjs
  • pnpm run test-e2e
View raw YAML
name: 'test'

on: workflow_call

permissions:
  contents: read # to fetch code (actions/checkout)

jobs:
  unit-test:
    runs-on: ubuntu-latest
    env:
      PUPPETEER_SKIP_DOWNLOAD: 'true'
    steps:
      - uses: actions/checkout@v6

      - name: Install pnpm
        uses: pnpm/action-setup@v5.0.0

      - name: Install Node.js
        uses: actions/setup-node@v6
        with:
          node-version-file: '.node-version'
          cache: 'pnpm'

      - run: pnpm install

      - name: Run unit tests
        run: pnpm run test-unit

  unit-test-windows:
    runs-on: windows-latest
    env:
      PUPPETEER_SKIP_DOWNLOAD: 'true'
    steps:
      - uses: actions/checkout@v6

      - name: Install pnpm
        uses: pnpm/action-setup@v5.0.0

      - name: Install Node.js
        uses: actions/setup-node@v6
        with:
          node-version-file: '.node-version'
          cache: 'pnpm'

      - run: pnpm install

      - name: Run compiler unit tests
        run: pnpm run test-unit compiler

      - name: Run ssr unit tests
        run: pnpm run test-unit server-renderer

  e2e-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Setup cache for Chromium binary
        uses: actions/cache@v5
        with:
          path: ~/.cache/puppeteer
          key: chromium-${{ hashFiles('pnpm-lock.yaml') }}

      - name: Install pnpm
        uses: pnpm/action-setup@v5.0.0

      - name: Install Node.js
        uses: actions/setup-node@v6
        with:
          node-version-file: '.node-version'
          cache: 'pnpm'

      - run: pnpm install
      - run: node node_modules/puppeteer/install.mjs

      - name: Run e2e tests
        run: pnpm run test-e2e

      - name: verify treeshaking
        run: node scripts/verify-treeshaking.js

  lint-and-test-dts:
    runs-on: ubuntu-latest
    env:
      PUPPETEER_SKIP_DOWNLOAD: 'true'
    steps:
      - uses: actions/checkout@v6

      - name: Install pnpm
        uses: pnpm/action-setup@v5.0.0

      - name: Install Node.js
        uses: actions/setup-node@v6
        with:
          node-version-file: '.node-version'
          cache: 'pnpm'

      - run: pnpm install

      - name: Run eslint
        run: pnpm run lint

      - name: Run prettier
        run: pnpm run format-check

      - name: Run tsc
        run: pnpm run check

      - name: Run type declaration tests
        run: pnpm run test-dts