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: ${{ 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. env:
  43. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  44. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  45. # - name: Publish
  46. # if: steps.changesets.outputs.hasChangesets == 'false'
  47. # run: yarn release-subpackages