release.yml 960 B

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