release-subpackages.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. name: Release Subpackages
  2. on:
  3. push:
  4. branches:
  5. - master
  6. paths:
  7. - .github/workflows/release-subpackages.yml
  8. workflow_run:
  9. workflows: ["Node CI for app development"]
  10. types:
  11. - completed
  12. branches:
  13. - master
  14. concurrency:
  15. group: ${{ github.workflow }}-${{ github.ref }}
  16. cancel-in-progress: true
  17. jobs:
  18. release-subpackages:
  19. runs-on: ubuntu-latest
  20. steps:
  21. - uses: actions/checkout@v4
  22. - uses: actions/setup-node@v4
  23. with:
  24. node-version: '20'
  25. cache: 'yarn'
  26. cache-dependency-path: '**/yarn.lock'
  27. - name: Cache/Restore node_modules
  28. id: cache-dependencies
  29. uses: actions/cache@v4
  30. with:
  31. path: |
  32. **/node_modules
  33. key: node_modules-release-subpackages-${{ runner.OS }}-node${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }}
  34. restore-keys: |
  35. node_modules-release-subpackages-${{ runner.OS }}-node${{ inputs.node-version }}-
  36. - name: Install dependencies
  37. run: |
  38. yarn global add turbo
  39. yarn global add node-gyp
  40. yarn --frozen-lockfile
  41. - name: Create Release Pull Request or Publish to npm
  42. id: changesets
  43. uses: changesets/action@v1
  44. with:
  45. publish: yarn release-sebpackages
  46. env:
  47. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  48. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}