update name #2
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: Build on PR Merge | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Install TypeScript | |
| run: npm install -g typescript | |
| - name: Run build script | |
| run: npm run build | |
| - name: Verify build output | |
| run: | | |
| if [ ! -f "dist/index.js" ]; then | |
| echo "Build failed - dist/index.js not found" | |
| exit 1 | |
| fi | |
| echo "Build successful - dist/index.js created" | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| retention-days: 30 |