fix(input): align border styling with textarea and add input best pra… #97
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 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| releases_created: ${{ steps.release.outputs.releases_created }} | |
| library_release_created: ${{ steps.release.outputs.release_created }} | |
| demo_release_created: ${{ steps.release.outputs['demo--release_created'] }} | |
| library_tag_name: ${{ steps.release.outputs.tag_name }} | |
| demo_tag_name: ${{ steps.release.outputs['demo--tag_name'] }} | |
| library_version: ${{ steps.release.outputs.version }} | |
| demo_version: ${{ steps.release.outputs['demo--version'] }} | |
| steps: | |
| - name: Release Please | |
| id: release | |
| uses: googleapis/release-please-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| config-file: .release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| # Build and test (shared for both library and demo) | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.releases_created == 'true' }} | |
| outputs: | |
| build_successful: ${{ steps.build.outputs.success }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| # Clean install to avoid cached native bindings issues | |
| rm -rf node_modules package-lock.json | |
| npm install | |
| # Reinstall SWC to ensure correct native bindings | |
| npm install --no-save @swc/core @swc/helpers | |
| - name: Run tests with memory optimization | |
| run: | | |
| # Increase Node.js memory limit for tests | |
| export NODE_OPTIONS="--max-old-space-size=4096" | |
| npm run test:run | |
| - name: Run type check | |
| run: npm run type-check | |
| - name: Build library | |
| run: npm run build:lib | |
| - name: Build demo | |
| run: npm run build:demo | |
| - name: Mark build as successful | |
| id: build | |
| run: echo "success=true" >> $GITHUB_OUTPUT | |
| - name: Upload library build artifacts | |
| if: ${{ needs.release-please.outputs.library_release_created == 'true' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: library-build-${{ needs.release-please.outputs.library_tag_name }} | |
| path: | | |
| dist/ | |
| package.json | |
| README.md | |
| CHANGELOG.md | |
| - name: Upload demo build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: demo-build-${{ github.sha }} | |
| path: dist-demo/ | |
| # Publish library to npm | |
| publish-library: | |
| runs-on: ubuntu-latest | |
| needs: [release-please, build] | |
| if: ${{ needs.release-please.outputs.library_release_created == 'true' && needs.build.outputs.build_successful == 'true' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Download library build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: library-build-${{ needs.release-please.outputs.library_tag_name }} | |
| - name: Publish to npm | |
| run: npm publish --ignore-scripts | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
| # Deploy demo to GitHub Pages | |
| deploy-demo: | |
| runs-on: ubuntu-latest | |
| needs: [release-please, build] | |
| if: ${{ needs.release-please.outputs.releases_created == 'true' && needs.build.outputs.build_successful == 'true' }} | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Download demo build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: demo-build-${{ github.sha }} | |
| path: dist-demo | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './dist-demo' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |