1.1.14 #61
This file contains 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 Bun Lambda Layer | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'version.yml' | |
jobs: | |
build-bun-lambda-layer: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Read bun version | |
run: | | |
VERSION=$(grep 'version:' version.yml | awk '{print $2}') | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Install bun | |
run: | | |
curl -fsSL https://bun.sh/install | bash -s -- bun-v$VERSION | |
- name: Clone bun | |
run: git clone -b bun-v$VERSION --depth 1 https://github.com/oven-sh/bun.git ./bun | |
- name: Build layer | |
run: | | |
export PATH=~/.bun/bin:$PATH | |
cd bun/packages/bun-lambda | |
bun install | |
bun run build-layer --output bun-lambda-layer-${VERSION}.zip | |
- name: Create release | |
run: gh release create "v$VERSION" bun/packages/bun-lambda/bun-lambda-layer-${VERSION}.zip --title "Release $VERSION" --notes "Lambda layer using bun-v$VERSION" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |