release.yml 1015 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: Release
  2. on:
  3. push:
  4. branches:
  5. - main
  6. permissions:
  7. contents: read
  8. pull-requests: write
  9. concurrency: ${{ github.workflow }}-${{ github.ref }}
  10. jobs:
  11. release:
  12. name: Release
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout Repo
  16. uses: actions/checkout@v4
  17. - name: Setup Node.js 18
  18. uses: actions/setup-node@v4
  19. with:
  20. node-version: 18
  21. - name: Install PNPM
  22. uses: pnpm/action-setup@v4
  23. with:
  24. version: 8
  25. - name: Install Dependencies
  26. run: pnpm install
  27. - name: Creating .npmrc
  28. run: |
  29. cat << EOF > "$HOME/.npmrc"
  30. //registry.npmjs.org/:_authToken=$NPM_TOKEN
  31. EOF
  32. env:
  33. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  34. - name: Create Release Pull Request
  35. uses: changesets/action@v1
  36. with:
  37. publish: pnpm release
  38. env:
  39. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  40. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}