release-subpackages.yml 1.4 KB

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