release.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: Release
  2. on:
  3. push:
  4. tags:
  5. - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
  6. jobs:
  7. test:
  8. uses: ./.github/workflows/test.yml
  9. release:
  10. # prevents this action from running on forks
  11. if: github.repository == 'vuejs/core'
  12. needs: [test]
  13. runs-on: ubuntu-latest
  14. permissions:
  15. contents: write
  16. id-token: write
  17. # Use Release environment for deployment protection
  18. environment: Release
  19. steps:
  20. - name: Checkout
  21. uses: actions/checkout@v6
  22. - name: Install pnpm
  23. uses: pnpm/action-setup@v4
  24. - name: Install Node.js
  25. uses: actions/setup-node@v6
  26. with:
  27. node-version-file: '.node-version'
  28. registry-url: 'https://registry.npmjs.org'
  29. cache: 'pnpm'
  30. - name: Install deps
  31. run: pnpm install
  32. - name: Update npm
  33. run: npm i -g npm@latest
  34. - name: Build and publish
  35. id: publish
  36. run: |
  37. pnpm release --publishOnly
  38. - name: Create GitHub release
  39. id: release_tag
  40. uses: yyx990803/release-tag@master
  41. env:
  42. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  43. with:
  44. tag_name: ${{ github.ref }}
  45. body: |
  46. For stable releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/main/CHANGELOG.md) for details.
  47. For pre-releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/minor/CHANGELOG.md) of the `minor` branch.