schematic-js@1.2.7 for improved handling of network disruptions (#737) #62
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-react | |
| on: | |
| push: | |
| tags: | |
| - 'schematic-react@*' | |
| 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@v5.0.0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Yarn install | |
| working-directory: ./react | |
| run: yarn install | |
| - name: Lint | |
| working-directory: ./react | |
| 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@v5.0.0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Yarn install | |
| working-directory: ./react | |
| run: yarn install | |
| - name: Test | |
| working-directory: ./react | |
| run: yarn test | |
| - name: Test (React Native) | |
| working-directory: ./react | |
| run: yarn test:reactnative | |
| 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@v5.0.0 | |
| - name: Set Node.js 24.x | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Yarn install | |
| working-directory: ./react | |
| run: yarn install | |
| - name: Build | |
| working-directory: ./react | |
| 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: ./react | |
| - name: Test .npmrc | |
| run: cat .npmrc | |
| working-directory: ./react | |
| - run: yarn publish --access public | |
| working-directory: ./react | |
| 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-react | |
| uses: actions/checkout@v5.0.0 | |
| with: | |
| path: schematic-react | |
| - name: Get react version | |
| id: get_version | |
| run: | | |
| cd schematic-react/react | |
| echo "SCHEMATIC_REACT_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: Checkout example app | |
| uses: actions/checkout@v5.0.0 | |
| 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-react@${{ steps.get_version.outputs.SCHEMATIC_REACT_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@v7.0.8 | |
| with: | |
| token: ${{ secrets.DEPENDENT_UPDATE_PAT }} | |
| commit-message: Update @schematichq/schematic-react to ${{ steps.get_version.outputs.SCHEMATIC_REACT_VERSION }} | |
| title: Update @schematichq/schematic-react to ${{ steps.get_version.outputs.SCHEMATIC_REACT_VERSION }} | |
| body: | | |
| This PR updates the @schematichq/schematic-react package to version ${{ steps.get_version.outputs.SCHEMATIC_REACT_VERSION }}. | |
| This update was automatically created by the schematic-react deployment process. | |
| branch: schematic-react-${{ steps.get_version.outputs.SCHEMATIC_REACT_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-react | |
| SLACK_ICON: https://schematic-public-assets.s3.amazonaws.com/logos/logo-transparent.png |