Skip to content

Commit 64f8aae

Browse files
committed
Add GitHub Actions workflow for automated releases
1 parent c57f929 commit 64f8aae

2 files changed

Lines changed: 116 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
name: Build binaries
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
include:
18+
- goos: linux
19+
goarch: amd64
20+
- goos: linux
21+
goarch: arm64
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Go
28+
uses: actions/setup-go@v5
29+
with:
30+
go-version: '1.21'
31+
32+
- name: Build binary
33+
env:
34+
GOOS: ${{ matrix.goos }}
35+
GOARCH: ${{ matrix.goarch }}
36+
run: |
37+
mkdir -p dist
38+
go build -ldflags="-s -w -X main.Version=${{ github.ref_name }}" \
39+
-o dist/infra.operator-${{ matrix.goos }}-${{ matrix.goarch }} \
40+
./cmd/infra.operator/...
41+
chmod +x dist/infra.operator-${{ matrix.goos }}-${{ matrix.goarch }}
42+
43+
- name: Upload artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: infra.operator-${{ matrix.goos }}-${{ matrix.goarch }}
47+
path: dist/infra.operator-${{ matrix.goos }}-${{ matrix.goarch }}
48+
49+
release:
50+
name: Create Release
51+
needs: build
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout code
55+
uses: actions/checkout@v4
56+
57+
- name: Download all artifacts
58+
uses: actions/download-artifact@v4
59+
with:
60+
path: dist
61+
merge-multiple: true
62+
63+
- name: List artifacts
64+
run: ls -la dist/
65+
66+
- name: Create checksums
67+
run: |
68+
cd dist
69+
sha256sum infra.operator-* > checksums.txt
70+
cat checksums.txt
71+
72+
- name: Create Release
73+
uses: softprops/action-gh-release@v1
74+
with:
75+
name: ${{ github.ref_name }}
76+
draft: false
77+
prerelease: false
78+
generate_release_notes: true
79+
files: |
80+
dist/infra.operator-linux-amd64
81+
dist/infra.operator-linux-arm64
82+
dist/checksums.txt
83+
body: |
84+
## Runner Codes ${{ github.ref_name }}
85+
86+
Secure code execution environment for AI-generated code using Firecracker microVMs.
87+
88+
### Downloads
89+
90+
| Platform | Architecture | Download |
91+
|----------|--------------|----------|
92+
| Linux | x86_64 (amd64) | `infra.operator-linux-amd64` |
93+
| Linux | ARM64 | `infra.operator-linux-arm64` |
94+
95+
### Installation
96+
97+
```bash
98+
# Download (Linux amd64)
99+
curl -L -o infra.operator https://github.com/andrebassi/runner-codes/releases/download/${{ github.ref_name }}/infra.operator-linux-amd64
100+
chmod +x infra.operator
101+
sudo mv infra.operator /usr/local/bin/
102+
```
103+
104+
### Links
105+
106+
- **Website:** https://runner.codes
107+
- **Documentation:** https://docs.runner.codes
108+
109+
### Verify checksums
110+
111+
```bash
112+
sha256sum -c checksums.txt
113+
```

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,6 @@ CLAUDE.md
7070

7171
# Scripts with credentials
7272
scripts/benchmark-on-demand.sh
73+
74+
# Release artifacts
75+
dist/

0 commit comments

Comments
 (0)