Build Layer ZIP #70
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 Layer ZIP | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Variables | |
| id: vars | |
| run: | | |
| sharp_version=$(npm view sharp version) | |
| echo "sharp_version=$sharp_version" >> $GITHUB_OUTPUT | |
| release_exists="true" | |
| git show-ref --tags --quiet --verify -- "refs/tags/$sharp_version" || release_exists="false" | |
| echo "release_exists=$release_exists" >> $GITHUB_OUTPUT | |
| - name: Build | |
| run: npm ci --arch=x64 --platform=linux | |
| - name: Create release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ steps.vars.outputs.sharp_version }} | |
| file: dist/sharp-layer.zip | |
| overwrite: true |