update deps and components version (#828) #129
Workflow file for this run
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: Deploy schematic-components | |
| on: | |
| push: | |
| tags: | |
| - 'schematic-components@*' | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: runs-on=${{ github.run_id }}/runner=4cpu-linux-x64/extras=s3-cache | |
| steps: | |
| - uses: runs-on/action@v2.0.3 | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Yarn install | |
| working-directory: ./components | |
| run: yarn install | |
| - name: Lint | |
| working-directory: ./components | |
| run: yarn lint | |
| test: | |
| name: Test | |
| runs-on: runs-on=${{ github.run_id }}/runner=4cpu-linux-x64/extras=s3-cache | |
| steps: | |
| - uses: runs-on/action@v2.0.3 | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Yarn install | |
| working-directory: ./components | |
| run: yarn install | |
| - name: Test | |
| working-directory: ./components | |
| run: yarn test | |
| publish: | |
| name: NPM Publish | |
| runs-on: runs-on=${{ github.run_id }}/runner=4cpu-linux-x64/extras=s3-cache | |
| permissions: | |
| packages: write | |
| contents: read | |
| needs: [test, lint] | |
| steps: | |
| - uses: runs-on/action@v2.0.3 | |
| - uses: actions/checkout@v6 | |
| - name: Set Node.js 24.x | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Yarn install | |
| working-directory: ./components | |
| run: yarn install | |
| - name: Build | |
| working-directory: ./components | |
| run: yarn build | |
| - name: Set up .npmrc | |
| run: touch .npmrc && echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| working-directory: ./components | |
| - name: Test .npmrc | |
| run: cat .npmrc | |
| working-directory: ./components | |
| - run: yarn publish --access public | |
| working-directory: ./components | |
| update_example_app: | |
| name: Update Example App | |
| runs-on: runs-on=${{ github.run_id }}/runner=4cpu-linux-x64/extras=s3-cache | |
| needs: [publish] | |
| steps: | |
| - uses: runs-on/action@v2.0.3 | |
| - name: Checkout schematic-components | |
| uses: actions/checkout@v6 | |
| 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@v6 | |
| with: | |
| repository: schematichq/schematic-next-example | |
| path: schematic-next-example | |
| token: ${{ secrets.DEPENDENT_UPDATE_PAT }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Update example app dependencies | |
| run: | | |
| cd schematic-next-example | |
| yarn add @schematichq/schematic-components@${{ steps.get_version.outputs.SCHEMATIC_COMPONENTS_VERSION }} | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| cd schematic-next-example | |
| git diff --exit-code || echo "HAS_CHANGES=true" >> $GITHUB_OUTPUT | |
| - name: Create Pull Request | |
| if: steps.check_changes.outputs.HAS_CHANGES == 'true' | |
| uses: peter-evans/create-pull-request@v8.0.0 | |
| with: | |
| token: ${{ secrets.DEPENDENT_UPDATE_PAT }} | |
| commit-message: Update @schematichq/schematic-components to ${{ steps.get_version.outputs.SCHEMATIC_COMPONENTS_VERSION }} | |
| 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: runs-on=${{ github.run_id }}/runner=1cpu-linux-arm64 | |
| needs: [publish] | |
| steps: | |
| - uses: rtCamp/action-slack-notify@v2.3.3 | |
| env: | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
| SLACK_TITLE: Updated schematic-components | |
| SLACK_ICON: https://schematic-public-assets.s3.amazonaws.com/logos/logo-transparent.png |