Skip to content

Commit 49c3383

Browse files
committed
ci: create release
Signed-off-by: Alan Wandke <[email protected]>
1 parent 72e5752 commit 49c3383

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: Create Release
3+
4+
on:
5+
push: # for testing remove this
6+
workflow_dispatch:
7+
8+
permissions:
9+
packages: read
10+
contents: write
11+
12+
jobs:
13+
create-ubuntu-release:
14+
runs-on: ubuntu-latest
15+
container:
16+
image: ghcr.io/nationalsecurityagency/seabee-build-ubuntu-noble:latest
17+
18+
steps:
19+
- name: Checkout source code
20+
uses: actions/checkout@v4
21+
22+
- name: Build Ubuntu 24.04 binaries
23+
run: make release
24+
25+
- name: Prepare release artifacts
26+
run: |
27+
mkdir -p artifacts
28+
cp target/release/seabee artifacts/
29+
cp target/release/seabeectl artifacts/
30+
cp install/journald.service artifacts/
31+
32+
- name: List release files (debug)
33+
run: ls -lh artifacts/
34+
35+
- name: Install GitHub CLI
36+
run: |
37+
apt-get update
38+
apt-get install -y gh
39+
40+
- name: Create GitHub draft release
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
TAG: ${{ github.ref_name }}
44+
REPO: ${{ github.repository }}
45+
run: |
46+
47+
# Authenticate
48+
gh auth setup-git && echo "${GITHUB_TOKEN}" | gh auth login --with-token
49+
50+
# Create draft release
51+
gh release create "${TAG}" \
52+
--repo "${REPO}" \
53+
--title "Seabee ${TAG} Ubuntu 24.04" \
54+
--draft \
55+
--notes "Release ${TAG} Ubuntu 24.04" \
56+
artifacts/seabee \
57+
artifacts/seabeectl \
58+
artifacts/journald.service

0 commit comments

Comments
 (0)