changeset-version.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # https://github.com/changesets/action
  2. name: Changeset version
  3. on:
  4. workflow_dispatch:
  5. pull_request:
  6. types:
  7. - closed
  8. branches:
  9. - main
  10. permissions:
  11. pull-requests: write
  12. contents: write
  13. env:
  14. CI: true
  15. jobs:
  16. version:
  17. if: (github.event.pull_request.merged || github.event_name == 'workflow_dispatch') && github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]')
  18. # if: github.repository == 'vbenjs/vue-vben-admin'
  19. timeout-minutes: 15
  20. runs-on: ubuntu-latest
  21. strategy:
  22. matrix:
  23. node-version: [20]
  24. steps:
  25. - name: Checkout code
  26. uses: actions/checkout@v4
  27. with:
  28. fetch-depth: 0
  29. - name: Install pnpm
  30. uses: pnpm/action-setup@v4
  31. - name: Use Node.js ${{ matrix.node-version }}
  32. uses: actions/setup-node@v4
  33. with:
  34. node-version: ${{ matrix.node-version }}
  35. cache: "pnpm"
  36. - name: Install dependencies
  37. run: pnpm install --frozen-lockfile
  38. - name: Create Release Pull Request
  39. uses: changesets/action@v1
  40. with:
  41. version: pnpm run version
  42. commit: "chore: bump versions"
  43. title: "chore: bump versions"
  44. env:
  45. GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}