release.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
  22. - name: Install pnpm
  23. uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
  24. - name: Install Node.js
  25. uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
  26. with:
  27. node-version-file: '.node-version'
  28. registry-url: 'https://registry.npmjs.org'
  29. - name: Install deps
  30. run: pnpm install --frozen-lockfile
  31. - name: Update npm
  32. run: npm i -g npm@latest
  33. - name: Build and publish
  34. id: publish
  35. run: |
  36. pnpm release --publishOnly
  37. - name: Create GitHub release
  38. id: release_tag
  39. uses: yyx990803/release-tag@8cccf7c5aa332d71d222df46677f70f77a8d2dc0 # v1.0.0
  40. env:
  41. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  42. with:
  43. tag_name: ${{ github.ref }}
  44. body: |
  45. For stable releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/main/CHANGELOG.md) for details.
  46. For pre-releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/minor/CHANGELOG.md) of the `minor` branch.