Skip to content

Commit 04d4d52

Browse files
committed
add github action for releases
1 parent 121d1fe commit 04d4d52

2 files changed

Lines changed: 73 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
lambda: [lfs-broker, lfs-snapshot]
17+
goarch: [amd64, arm64]
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: actions/setup-go@v5
22+
with:
23+
go-version-file: ${{ matrix.lambda }}/go.mod
24+
25+
- name: Build
26+
working-directory: ${{ matrix.lambda }}
27+
run: GOOS=linux GOARCH=${{ matrix.goarch }} CGO_ENABLED=0 go build -tags lambda.norpc -o bootstrap main.go
28+
29+
- name: Package
30+
working-directory: ${{ matrix.lambda }}
31+
run: zip ${{ matrix.lambda }}-linux-${{ matrix.goarch }}.zip bootstrap
32+
33+
- uses: actions/upload-artifact@v4
34+
with:
35+
name: ${{ matrix.lambda }}-linux-${{ matrix.goarch }}
36+
path: ${{ matrix.lambda }}/${{ matrix.lambda }}-linux-${{ matrix.goarch }}.zip
37+
38+
release:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/download-artifact@v4
43+
with:
44+
path: artifacts
45+
merge-multiple: true
46+
47+
- name: Create release
48+
uses: softprops/action-gh-release@v2
49+
with:
50+
generate_release_notes: true
51+
files: artifacts/*.zip

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,28 @@ full and incremental migration approaches.
350350

351351
---
352352

353+
## Releases
354+
355+
Pre-built Lambda zip files are published as GitHub Release assets on every
356+
tagged version. Each release includes builds for both architectures:
357+
358+
| Asset | Architecture |
359+
|---|---|
360+
| `lfs-broker-linux-amd64.zip` | x86_64 |
361+
| `lfs-broker-linux-arm64.zip` | arm64 |
362+
| `lfs-snapshot-linux-amd64.zip` | x86_64 |
363+
| `lfs-snapshot-linux-arm64.zip` | arm64 |
364+
365+
### Creating a release
366+
367+
```bash
368+
git tag v1.0.0
369+
git push origin v1.0.0
370+
```
371+
372+
The GitHub Actions workflow builds both lambdas for both architectures and
373+
attaches the zips to the release automatically.
374+
353375
## Background
354376

355377
This project was built to solve a specific problem for the

0 commit comments

Comments
 (0)