release-subpackages.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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: ${{ github.workflow }}-${{ github.ref }}
  15. jobs:
  16. release-subpackages:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - uses: actions/checkout@v4
  20. - uses: actions/setup-node@v4
  21. with:
  22. node-version: '20'
  23. cache: 'yarn'
  24. cache-dependency-path: '**/yarn.lock'
  25. - name: Cache/Restore node_modules
  26. id: cache-dependencies
  27. uses: actions/cache@v4
  28. with:
  29. path: |
  30. **/node_modules
  31. key: node_modules-release-subpackages-${{ runner.OS }}-node${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }}
  32. restore-keys: |
  33. node_modules-release-subpackages-${{ runner.OS }}-node${{ inputs.node-version }}-
  34. - name: Install dependencies
  35. run: |
  36. yarn global add turbo
  37. yarn global add node-gyp
  38. yarn --frozen-lockfile
  39. - name: Create Release Pull Request or Publish to npm
  40. id: changesets
  41. uses: changesets/action@v1
  42. with:
  43. publish: yarn release-sebpackages
  44. env:
  45. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  46. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}