release-beta.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: Pre-release
  2. on:
  3. push:
  4. branches:
  5. - beta
  6. - dev-changesets
  7. concurrency: ${{ github.workflow }}-${{ github.ref }}
  8. jobs:
  9. release:
  10. name: PR or Release
  11. if: ${{ github.repository_owner == 'tabler' }}
  12. runs-on: ubuntu-latest
  13. permissions:
  14. contents: write
  15. pull-requests: write
  16. steps:
  17. - name: Checkout Repo
  18. uses: actions/checkout@v4
  19. - uses: ruby/setup-ruby@v1
  20. with:
  21. bundler-cache: true
  22. - name: Enable corepack
  23. run: corepack enable pnpm
  24. - name: Setup Node.js 18
  25. uses: actions/setup-node@v4
  26. with:
  27. cache: 'pnpm'
  28. node-version: 18
  29. registry-url: 'https://registry.npmjs.org'
  30. - name: Install Dependencies
  31. run: pnpm install
  32. - name: Build Package
  33. run: pnpm run build
  34. - name: Enable Pre-release
  35. run: pnpm changeset pre enter beta
  36. - name: Creating .npmrc
  37. run: |
  38. cat << EOF > "$HOME/.npmrc"
  39. //registry.npmjs.org/:_authToken=$NPM_TOKEN
  40. EOF
  41. env:
  42. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  43. - name: Create Release Pull Request
  44. uses: changesets/action@v1
  45. with:
  46. # Note: pnpm install after versioning is necessary to refresh lockfile
  47. version: pnpm run version
  48. publish: pnpm release
  49. env:
  50. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  51. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  52. NPM_CONFIG_PROVENANCE: true