From: 三咲智子 Kevin Deng Date: Tue, 17 Sep 2024 02:39:36 +0000 (+0800) Subject: ci: cleanup & fix repo X-Git-Tag: v3.6.0-alpha.1~16^2~325 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=daf098ef6827b7a6fc6a028e48bb7ceac74fcece;p=thirdparty%2Fvuejs%2Fcore.git ci: cleanup & fix repo --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8c217f62c..fdbcd4cac5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,29 +14,3 @@ 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@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - name: Install Node.js - uses: actions/setup-node@v4 - 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/*' diff --git a/.github/workflows/close-cant-reproduce-issues.yml b/.github/workflows/close-cant-reproduce-issues.yml index 8fb48f842d..37bd962261 100644 --- a/.github/workflows/close-cant-reproduce-issues.yml +++ b/.github/workflows/close-cant-reproduce-issues.yml @@ -9,7 +9,7 @@ permissions: jobs: close-issues: - if: github.repository == 'vuejs/core' + if: github.repository == 'vuejs/core-vapor' runs-on: ubuntu-latest steps: - name: can't reproduce diff --git a/.github/workflows/ecosystem-ci-trigger.yml b/.github/workflows/ecosystem-ci-trigger.yml deleted file mode 100644 index b3e963ecec..0000000000 --- a/.github/workflows/ecosystem-ci-trigger.yml +++ /dev/null @@ -1,90 +0,0 @@ -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@v7 - 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@v7 - 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@v7 - 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 - } - }) diff --git a/.github/workflows/lock-closed-issues.yml b/.github/workflows/lock-closed-issues.yml index 68a7d6c7a1..bc57ece043 100644 --- a/.github/workflows/lock-closed-issues.yml +++ b/.github/workflows/lock-closed-issues.yml @@ -9,7 +9,7 @@ permissions: jobs: action: - if: github.repository == 'vuejs/core' + if: github.repository == 'vuejs/core-vapor' runs-on: ubuntu-latest steps: - uses: dessant/lock-threads@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index c260a728e7..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,55 +0,0 @@ -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@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.node-version' - registry-url: 'https://registry.npmjs.org' - cache: 'pnpm' - - - name: Install deps - run: pnpm install - - - name: Build and publish - id: publish - run: | - pnpm release --publishOnly - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - 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. diff --git a/.github/workflows/size-data.yml b/.github/workflows/size-data.yml index b7d8909697..1fd495fe24 100644 --- a/.github/workflows/size-data.yml +++ b/.github/workflows/size-data.yml @@ -18,7 +18,7 @@ env: jobs: upload: - if: github.repository == 'vuejs/core' + if: github.repository == 'vuejs/core-vapor' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/size-report.yml b/.github/workflows/size-report.yml index f9d2052b69..1695f0c5fd 100644 --- a/.github/workflows/size-report.yml +++ b/.github/workflows/size-report.yml @@ -18,7 +18,7 @@ jobs: size-report: runs-on: ubuntu-latest if: > - github.repository == 'vuejs/core' && + github.repository == 'vuejs/core-vapor' && github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb5d9e9902..9703a0c561 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,17 +54,19 @@ jobs: - name: Run type declaration tests run: pnpm run test-dts - release: + continuous-release: + if: github.repository == 'vuejs/core-vapor' runs-on: ubuntu-latest needs: [unit-test, lint-and-test-dts] permissions: contents: read id-token: write steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - name: Install pnpm - uses: pnpm/action-setup@v4.0.0 + uses: pnpm/action-setup@v4 - name: Install Node.js uses: actions/setup-node@v4 @@ -73,10 +75,11 @@ jobs: registry-url: 'https://registry.npmjs.org' cache: 'pnpm' - - run: pnpm install + - name: Install deps + run: pnpm install - name: Build run: pnpm build --withTypes - - name: Publish - run: pnpm dlx pkg-pr-new@0.0 publish './packages/*' --template './playground' --pnpm + - name: Release + run: pnpx pkg-pr-new publish --pnpm './packages/*' --template './playground'