release.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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: Setup Vite+
  23. uses: voidzero-dev/setup-vp@v1
  24. with:
  25. node-version-file: '.node-version'
  26. cache: true
  27. - name: Update npm
  28. run: npm i -g npm@latest
  29. - name: Build and publish
  30. id: publish
  31. run: |
  32. vp run release --publishOnly
  33. - name: Create GitHub release
  34. id: release_tag
  35. uses: yyx990803/release-tag@master
  36. env:
  37. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  38. with:
  39. tag_name: ${{ github.ref }}
  40. body: |
  41. For stable releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/main/CHANGELOG.md) for details.
  42. For pre-releases, please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/minor/CHANGELOG.md) of the `minor` branch.