Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
IFS='.' read -r MAJOR MINOR PATCH <<< "${{ inputs.version }}"
PKG_MINOR=$((MAJOR * 10000 + MINOR * 100 + PATCH))
echo "version=3.${PKG_MINOR}.0" >> "$GITHUB_OUTPUT"
echo "version=4.${PKG_MINOR}.0" >> "$GITHUB_OUTPUT"

- name: Commit and create PR
uses: peter-evans/create-pull-request@v8
Expand All @@ -70,8 +70,8 @@ jobs:
- Updated `src/index.ts` version constant
- Updated `README.md` version badge

The layer zip is built fresh during release — no binary committed.
Merging this PR will trigger the release workflow and publish `@beesolve/lambda-bun-runtime@${{ steps.pkg.outputs.version }}` to npm.
The layer zip is built fresh during release - no binary committed.
Merging this PR will trigger the release workflow: it publishes the public layer in all regions, runs the integration test against it and then publishes `@beesolve/lambda-bun-runtime@${{ steps.pkg.outputs.version }}` to npm.
add-paths: |
.bun-version
src/index.ts
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: integration

on:
workflow_call: {}
workflow_call:
inputs:
published-layer:
description: "Deploy the published layer (artifacts.json from the release run) instead of a layer built from source"
type: boolean
default: false
workflow_dispatch: {}
pull_request:
paths:
Expand Down Expand Up @@ -42,6 +47,23 @@ jobs:

- run: bun install --frozen-lockfile

- name: Use the published layer
if: inputs.published-layer
uses: actions/download-artifact@v8
with:
name: artifacts-json-first-region
path: src

- name: Deploy the function on the published runtime too
if: inputs.published-layer
run: echo "BUN_CMR=1" >> "$GITHUB_ENV"

- name: Build the layer from source
if: ${{ !inputs.published-layer }}
run: |
bun run build:layer
echo "BUN_LAYER_ZIP=$PWD/lib/bun-lambda-layer-$(cat .bun-version).zip" >> "$GITHUB_ENV"

- run: bun run build

- run: bun run integ:deploy-test-destroy
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/publish-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: publish-smoke

# Publishes the runtime to one region with a throwaway version and alias, to check the
# publish role, the AWS CLI and the Docker build. Not public, nothing goes to npm.
on:
workflow_dispatch: {}
push:
branches: [feat/v4-public-artifacts]
paths: [".github/workflows/publish-smoke.yml"]

jobs:
publish-runtime:
runs-on: ubuntu-24.04
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2
with:
bun-version-file: .bun-version

- run: bun install --frozen-lockfile

- name: Install the latest AWS CLI
run: |
curl -sSf https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip
unzip -q awscliv2.zip
sudo ./aws/install --update
aws --version

- uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_PUBLISH_ROLE_ARN }}
aws-region: eu-central-1

- name: Publish the runtime
run: |
bun command/publishRuntime.ts \
--region eu-central-1 \
"$(cat .bun-version)" \
--version-name smoke-${{ github.run_id }} \
--alias smoke-${{ github.run_id }} \
--out runtime-result.json
cat runtime-result.json
Loading