ci: add build workflow #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 Lambda Package | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build Lambda Package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node.js 18.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.x | |
| cache: 'npm' | |
| - name: Install production dependencies only | |
| run: npm ci --only=production | |
| - name: Build zip package | |
| run: npm run build-zip | |
| - name: Calculate SHA256 checksum | |
| run: | | |
| npm run calculate-sha > ymir-image-processing-checksum.txt | |
| cat ymir-image-processing-checksum.txt | |
| - name: Upload Lambda zip as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ymir-image-processing.zip | |
| - name: Upload SHA256 checksum as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ymir-image-processing-checksum.txt |