-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (62 loc) · 1.81 KB
/
release.yml
File metadata and controls
71 lines (62 loc) · 1.81 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
# Release workflow for Launchpad
# Triggered on tags (e.g., v1.5.16).
name: Release
permissions:
contents: read # Top-level: Restricts all jobs by default
packages: write # Required for uploading artifacts
on:
push:
tags:
- "v*"
jobs:
build:
name: Build Release Binaries
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: Build binaries
run: |
mkdir -p dist
platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/arm64" "darwin/amd64" "darwin/arm64")
for platform in "${platforms[@]}"; do
GOOS=${platform%/*}
GOARCH=${platform#*/}
output_name="dist/launchpad_${GOOS}_${GOARCH}"
if [ "$GOOS" = "windows" ]; then
output_name+=".exe"
fi
echo "Building $output_name"
GOOS=$GOOS GOARCH=$GOARCH go build -o "$output_name" ./main.go
done
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: launchpad-release-binaries
path: dist/
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Download binaries
uses: actions/download-artifact@v4
with:
name: launchpad-release-binaries
path: dist/
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
generate_release_notes: true
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TODO: Add Digicert signing here.
# TODO: Push signed artifacts to S3 here.