Skip to content

Commit 03f5914

Browse files
Release checksums and legacy asset filenames (#619)
* chore: update CI workflows to Go 1.26 and codify AI agent branch rules Signed-off-by: James Nesbitt <jnesbitt@mirantis.com> * release-cleanup - add checksums, - revert to the old format for binary names Signed-off-by: James Nesbitt <jnesbitt@mirantis.com> --------- Signed-off-by: James Nesbitt <jnesbitt@mirantis.com>
1 parent 938f56a commit 03f5914

7 files changed

Lines changed: 60 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ jobs:
1414
build:
1515
name: Build Binaries
1616
runs-on: ubuntu-latest
17+
env:
18+
GOTOOLCHAIN: auto
19+
1720
steps:
1821
- name: Checkout code
1922
uses: actions/checkout@v4
2023

2124
- name: Set up Go
2225
uses: actions/setup-go@v5
2326
with:
24-
go-version: "1.25"
27+
go-version-file: go.mod
28+
cache: true
2529

2630
- name: Build binaries
2731
run: |
@@ -47,6 +51,9 @@ jobs:
4751
test:
4852
name: Run Tests
4953
runs-on: ubuntu-latest
54+
env:
55+
GOTOOLCHAIN: auto
56+
5057
needs: build
5158
steps:
5259
- name: Checkout code
@@ -55,7 +62,8 @@ jobs:
5562
- name: Set up Go
5663
uses: actions/setup-go@v5
5764
with:
58-
go-version: "1.22"
65+
go-version-file: go.mod
66+
cache: true
5967

6068
- name: Run unit tests
6169
run: go test -v ./...

.github/workflows/go.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
1616
runs-on: ${{ matrix.os }}
17+
env:
18+
GOTOOLCHAIN: auto
19+
1720

1821
steps:
19-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@v4
2023

2124
- name: Set up Go
22-
uses: actions/setup-go@v6
25+
uses: actions/setup-go@v5
2326
with:
2427
go-version-file: go.mod
2528

.github/workflows/pr.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,44 +25,56 @@ jobs:
2525
lint:
2626
name: Lint Code
2727
runs-on: ubuntu-latest
28+
env:
29+
GOTOOLCHAIN: auto
30+
2831
steps:
2932
- name: Checkout code
3033
uses: actions/checkout@v4
3134

3235
- name: Set up Go
3336
uses: actions/setup-go@v5
3437
with:
35-
go-version: "1.25"
38+
go-version-file: go.mod
39+
cache: true
3640

3741
- name: Run golangci-lint
3842
run: make lint
3943

4044
unit-test:
4145
name: Unit Tests
4246
runs-on: ubuntu-latest
47+
env:
48+
GOTOOLCHAIN: auto
49+
4350
steps:
4451
- name: Checkout code
4552
uses: actions/checkout@v4
4653

4754
- name: Set up Go
4855
uses: actions/setup-go@v5
4956
with:
50-
go-version: "1.25"
57+
go-version-file: go.mod
58+
cache: true
5159

5260
- name: Run unit tests
5361
run: make unit-test
5462

5563
integration-test:
5664
name: Integration Tests
5765
runs-on: ubuntu-latest
66+
env:
67+
GOTOOLCHAIN: auto
68+
5869
steps:
5970
- name: Checkout code
6071
uses: actions/checkout@v4
6172

6273
- name: Set up Go
6374
uses: actions/setup-go@v5
6475
with:
65-
go-version: "1.25"
76+
go-version-file: go.mod
77+
cache: true
6678

6779
- name: Run integration tests
6880
run: make integration-test
@@ -72,14 +84,18 @@ jobs:
7284
security-scan:
7385
name: Security Scan
7486
runs-on: ubuntu-latest
87+
env:
88+
GOTOOLCHAIN: auto
89+
7590
steps:
7691
- name: Checkout code
7792
uses: actions/checkout@v4
7893

7994
- name: Set up Go
8095
uses: actions/setup-go@v5
8196
with:
82-
go-version: "1.25"
97+
go-version-file: go.mod
98+
cache: true
8399

84100
- name: Install govulncheck
85101
run: go install golang.org/x/vuln/cmd/govulncheck@latest

.github/workflows/release.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,37 @@ jobs:
1515
build:
1616
name: Build Release Binaries
1717
runs-on: ubuntu-latest
18+
env:
19+
GOTOOLCHAIN: auto
20+
1821
steps:
1922
- name: Checkout code
2023
uses: actions/checkout@v4
2124

2225
- name: Set up Go
2326
uses: actions/setup-go@v5
2427
with:
25-
go-version: "1.25"
28+
go-version-file: go.mod
2629

2730
- name: Build binaries
2831
run: |
2932
mkdir -p dist
30-
platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/arm64" "darwin/amd64" "darwin/arm64")
33+
VERSION=${{ github.ref_name }}
34+
platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/arm64" "darwin/amd64" "darwin/arm64" "freebsd/amd64" "freebsd/arm64")
3135
for platform in "${platforms[@]}"; do
3236
GOOS=${platform%/*}
3337
GOARCH=${platform#*/}
34-
output_name="dist/launchpad_${GOOS}_${GOARCH}"
38+
output_name="dist/launchpad_${GOOS}_${GOARCH}_${VERSION#v}"
3539
if [ "$GOOS" = "windows" ]; then
3640
output_name+=".exe"
3741
fi
3842
echo "Building $output_name"
3943
GOOS=$GOOS GOARCH=$GOARCH go build -o "$output_name" ./main.go
4044
done
45+
- name: Generate checksums
46+
run: |
47+
cd dist
48+
sha256sum launchpad_* > checksums.sha256
4149
4250
- name: Upload artifacts
4351
uses: actions/upload-artifact@v4
@@ -68,4 +76,4 @@ jobs:
6876
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6977

7078
# TODO: Add Digicert signing here.
71-
# TODO: Push signed artifacts to S3 here.
79+
# TODO: Push signed artifacts to S3 here.

AI_AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This document defines guidelines for AI agents working on the Launchpad project.
99
1. **Generalization**: Support all AI agents, not just specific providers.
1010
2. **Consistency**: Follow Launchpad’s architectural patterns and conventions.
1111
3. **Clarity**: Document decisions and reasoning for human reviewers.
12+
4. **Branching**: NEVER work on, push to, or merge to the `main` branch. All work MUST be done on feature branches.
1213

1314
---
1415

@@ -29,13 +30,18 @@ Documentation is organized to minimize context overhead for agents:
2930
- Read `docs/guidance/project.md` to understand core architectural principles.
3031
- For feature requests, review the relevant PRD in `docs/requirements/`.
3132
- For bug fixes, review the relevant specification in `docs/specifications/`.
33+
- **Environment**: Ensure `GOTOOLCHAIN=auto` is used for all `go` commands to support the required toolchain.
3234

3335
### 2. Strategy Phase
36+
- **ALWAYS** create a new feature branch from `main`.
3437
- Propose changes that align with the **Phase Manager** architecture (`docs/specifications/architecture.md`).
3538
- Ensure changes are backwards compatible or include migrations (`docs/specifications/architecture.md`).
3639
- Document trade-offs and decisions in the PR description.
3740

3841
### 3. Execution Phase
42+
- **NEVER** push directly to `main`.
43+
- **NEVER** merge into `main`.
44+
- All work MUST be pushed to a remote feature branch for human review.
3945
- All commits MUST be signed.
4046
- Follow the testing strategy outlined in `docs/development/workflow.md`.
4147
- Use `make local` for rapid iteration and validation.

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
# Ensure we use auto toolchain
3+
export GOTOOLCHAIN=auto
4+
5+
26
.PHONY: clean
37
clean:
48
rm -fr dist

version/version.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func (a *Asset) IsForHost() bool {
4444
}
4545

4646
parts := strings.Split(strings.TrimSuffix(a.Name, ".exe"), "_")
47+
if len(parts) < 3 {
48+
return false
49+
}
4750
return parts[1] == runtime.GOOS && parts[2] == runtime.GOARCH
4851
}
4952

0 commit comments

Comments
 (0)