feat: add fs capability to debarrel codemod #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| outputs: | |
| published: ${{ steps.changesets.outputs.published }} | |
| changed_dirs: ${{ steps.tag.outputs.changed_dirs }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Create Release PR or Publish | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm version-packages | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Tag released versions | |
| if: steps.changesets.outputs.hasChangesets == 'false' | |
| id: tag | |
| run: bash scripts/tag-and-publish.sh | |
| publish: | |
| name: Publish ${{ matrix.dir }} | |
| needs: release | |
| if: needs.release.outputs.changed_dirs != '[]' && needs.release.outputs.changed_dirs != '' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| dir: ${{ fromJson(needs.release.outputs.changed_dirs) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Publish codemod | |
| uses: codemod/publish-action@v1 | |
| with: | |
| path: ${{ matrix.dir }} |