diff --git a/.github/workflows/deploy_components.yml b/.github/workflows/deploy_components.yml index ba5e7f6b..c80a926f 100644 --- a/.github/workflows/deploy_components.yml +++ b/.github/workflows/deploy_components.yml @@ -52,6 +52,55 @@ jobs: - run: yarn publish --access public working-directory: ./components + update_example_app: + name: Update Example App + runs-on: ubuntu-latest + needs: [publish] + steps: + - name: Checkout schematic-components + uses: actions/checkout@v4 + with: + path: schematic-components + + - name: Get component version + id: get_version + run: | + cd schematic-components/components + echo "SCHEMATIC_COMPONENTS_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Checkout example app + uses: actions/checkout@v4 + with: + repository: schematichq/schematic-next-example + path: schematic-next-example + token: ${{ secrets.GH_PAT }} + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: Update example app dependencies + run: | + cd schematic-next-example + yarn add @schematichq/schematic-components@${{ steps.get_version.outputs.SCHEMATIC_COMPONENTS_VERSION }} + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GH_PAT }} + commit-message: Update @schematichq/schematic-components to ${{ steps.get_version.outputs.SCHEMATIC_COMPONENTS_VERSION }} + team-reviewers: schematichq/frontend + title: Update @schematichq/schematic-components to ${{ steps.get_version.outputs.SCHEMATIC_COMPONENTS_VERSION }} + body: | + This PR updates the @schematichq/schematic-components package to version ${{ steps.get_version.outputs.SCHEMATIC_COMPONENTS_VERSION }}. + + This update was automatically created by the schematic-components deployment process. + branch: schematic-components-${{ steps.get_version.outputs.SCHEMATIC_COMPONENTS_VERSION }} + base: main + delete-branch: true + path: schematic-next-example + notify_slack: name: Notify Slack runs-on: ubuntu-latest