-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (65 loc) · 2.46 KB
/
Copy pathbuild-layer.yml
File metadata and controls
78 lines (65 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: build-layer
on:
workflow_dispatch:
inputs:
version:
description: "Bun version to build (semver, e.g. 1.3.14)"
required: true
type: string
workflow_call:
inputs:
version:
description: "Bun version to build (semver, e.g. 1.3.14)"
required: true
type: string
jobs:
build-and-pr:
name: Build layer and create PR
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
BUN_VERSION: ${{ inputs.version }}
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ inputs.version }}
- run: bun install --frozen-lockfile
- name: Verify layer builds successfully
run: bun run build:layer
- name: Update .bun-version
run: echo "${{ inputs.version }}" > .bun-version
- name: Update src/index.ts
run: |
sed -i "s/const bunVersion = \".*\"/const bunVersion = \"${{ inputs.version }}\"/" src/index.ts
- name: Update README.md
run: |
sed -i "s|Current bun version: \[.*\](.*)|Current bun version: [${{ inputs.version }}](https://bun.sh/blog/bun-v${{ inputs.version }})|" README.md
- name: Compute package version
id: pkg
run: |
IFS='.' read -r MAJOR MINOR PATCH <<< "${{ inputs.version }}"
PKG_MINOR=$((MAJOR * 10000 + MINOR * 100 + PATCH))
echo "version=3.${PKG_MINOR}.0" >> "$GITHUB_OUTPUT"
- name: Commit and create PR
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "feat: update bun runtime to v${{ inputs.version }}"
branch: "bun-update/${{ inputs.version }}"
title: "feat: update bun runtime to v${{ inputs.version }}"
body: |
Updates the Bun Lambda runtime layer to v${{ inputs.version }}.
**Package version:** `${{ steps.pkg.outputs.version }}`
### Changes
- Updated `.bun-version`
- 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.
add-paths: |
.bun-version
src/index.ts
README.md