Skip to content

Commit 604ca49

Browse files
committed
fix(ci): update
1 parent fdb2ff2 commit 604ca49

3 files changed

Lines changed: 6 additions & 144 deletions

File tree

.github/conf/.goreleaser.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ builds:
1414
- amd64
1515
- arm64
1616
ignore:
17+
- goos: linux
18+
goarch: arm64
1719
- goos: windows
1820
goarch: arm64
1921
flags:

.github/workflows/build.yml

Lines changed: 3 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -6,72 +6,23 @@ on:
66
- 'v*'
77
workflow_dispatch:
88

9-
env:
10-
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11-
DIAG_DIR: /tmp/ctk-diagnostics
12-
139
jobs:
1410
goreleaser:
1511
runs-on: ubuntu-latest
1612
timeout-minutes: 60
1713
steps:
1814
- name: Checkout
19-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
2016
with:
2117
fetch-depth: 0
2218

2319
- name: Set up Go
24-
uses: actions/setup-go@v5
20+
uses: actions/setup-go@v6
2521
with:
26-
go-version-file: go.mod
22+
go-version: 1.25.5
2723
cache: true
2824
cache-dependency-path: go.sum
2925

30-
- name: Collect context
31-
run: |
32-
set -euxo pipefail
33-
mkdir -p "$DIAG_DIR"
34-
{
35-
echo "date=$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
36-
echo "github_ref=${GITHUB_REF}"
37-
echo "github_ref_name=${GITHUB_REF_NAME}"
38-
echo "github_sha=${GITHUB_SHA}"
39-
echo "runner_os=${RUNNER_OS}"
40-
echo "runner_arch=${RUNNER_ARCH}"
41-
echo "pwd=$(pwd)"
42-
} | tee "$DIAG_DIR/context.txt"
43-
git status --short | tee "$DIAG_DIR/git-status.txt"
44-
git rev-parse HEAD | tee "$DIAG_DIR/git-head.txt"
45-
git tag --points-at HEAD | tee "$DIAG_DIR/git-head-tags.txt"
46-
git show --stat --summary --pretty=fuller HEAD | tee "$DIAG_DIR/git-head-summary.txt"
47-
go version | tee "$DIAG_DIR/go-version.txt"
48-
go env | tee "$DIAG_DIR/go-env.txt"
49-
sha256sum go.mod go.sum | tee "$DIAG_DIR/go-files.sha256"
50-
sed -n '1,220p' go.mod | tee "$DIAG_DIR/go.mod.txt"
51-
sed -n '1,220p' .github/conf/.goreleaser.yml | tee "$DIAG_DIR/goreleaser.yml.txt"
52-
53-
- name: Warm module cache
54-
run: |
55-
set -euxo pipefail
56-
go mod download
57-
go mod verify
58-
go list -m all | tee "$DIAG_DIR/go-list-m-all.txt"
59-
go list -m -json all > "$DIAG_DIR/go-list-m-all.json"
60-
go mod graph | tee "$DIAG_DIR/go-mod-graph.txt"
61-
go list -deps -f '{{if not .Standard}}{{.ImportPath}}{{end}}' ./cmd/main.go | sort | tee "$DIAG_DIR/go-list-deps-main.txt"
62-
go list -deps -json ./cmd/main.go > "$DIAG_DIR/go-list-deps-main.json"
63-
64-
- name: Warm build cache
65-
run: |
66-
set -euxo pipefail
67-
go build -trimpath -ldflags "-s -w" -o /tmp/ctk ./cmd/main.go
68-
ls -lh /tmp/ctk | tee "$DIAG_DIR/warm-build-ls.txt"
69-
file /tmp/ctk | tee "$DIAG_DIR/warm-build-file.txt"
70-
sha256sum /tmp/ctk | tee "$DIAG_DIR/warm-build.sha256"
71-
go version -m /tmp/ctk | tee "$DIAG_DIR/warm-build-go-version-m.txt"
72-
go tool buildid /tmp/ctk | tee "$DIAG_DIR/warm-build-buildid.txt"
73-
(size /tmp/ctk || true) | tee "$DIAG_DIR/warm-build-size.txt"
74-
7526
- name: Run GoReleaser
7627
uses: goreleaser/goreleaser-action@v6
7728
with:
@@ -80,94 +31,3 @@ jobs:
8031
args: release -f .github/conf/.goreleaser.yml --clean --parallelism 1 --verbose
8132
env:
8233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83-
84-
- name: Inspect dist
85-
if: always()
86-
run: |
87-
set -euxo pipefail
88-
if [ -d dist ]; then
89-
ls -la dist/ | tee "$DIAG_DIR/dist-root.txt"
90-
find dist -maxdepth 2 -type f | sort | tee "$DIAG_DIR/dist-files.txt"
91-
find dist -maxdepth 2 -type f -exec ls -lh {} + | tee "$DIAG_DIR/dist-ls.txt"
92-
find dist -maxdepth 2 -type f -exec file {} + | tee "$DIAG_DIR/dist-file.txt"
93-
find dist -maxdepth 2 -type f -exec sha256sum {} + | tee "$DIAG_DIR/dist.sha256"
94-
for f in $(find dist -maxdepth 2 -type f -name 'ctk*' 2>/dev/null | sort); do
95-
echo "=== $f ===" | tee -a "$DIAG_DIR/dist-binaries.txt"
96-
ls -lh "$f" | tee -a "$DIAG_DIR/dist-binaries.txt"
97-
file "$f" | tee -a "$DIAG_DIR/dist-binaries.txt"
98-
go tool buildid "$f" | tee -a "$DIAG_DIR/dist-binaries.txt" || true
99-
go version -m "$f" | tee -a "$DIAG_DIR/dist-binaries.txt" || true
100-
(size "$f" || true) | tee -a "$DIAG_DIR/dist-binaries.txt"
101-
done
102-
du -sh dist | tee "$DIAG_DIR/dist-size.txt"
103-
sed -n '1,240p' dist/artifacts.json | tee "$DIAG_DIR/dist-artifacts.json.txt" || true
104-
sed -n '1,240p' dist/checksums.txt | tee "$DIAG_DIR/dist-checksums.txt" || true
105-
else
106-
echo "dist directory missing" | tee "$DIAG_DIR/dist-missing.txt"
107-
fi
108-
109-
- name: Compare linux amd64 output
110-
if: always()
111-
run: |
112-
set -euxo pipefail
113-
TARGET="dist/ctk_linux_amd64_v1/ctk"
114-
if [ -f /tmp/ctk ] && [ -f "$TARGET" ]; then
115-
ls -lh /tmp/ctk "$TARGET" | tee "$DIAG_DIR/compare-linux-amd64-ls.txt"
116-
sha256sum /tmp/ctk "$TARGET" | tee "$DIAG_DIR/compare-linux-amd64.sha256"
117-
cmp -s /tmp/ctk "$TARGET" && echo "identical=true" | tee "$DIAG_DIR/compare-linux-amd64-cmp.txt" || echo "identical=false" | tee "$DIAG_DIR/compare-linux-amd64-cmp.txt"
118-
else
119-
echo "linux amd64 artifact missing" | tee "$DIAG_DIR/compare-linux-amd64-cmp.txt"
120-
fi
121-
122-
- name: Inspect GitHub release assets
123-
if: always()
124-
env:
125-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126-
run: |
127-
set -euxo pipefail
128-
if gh release view "${GITHUB_REF_NAME}" --json tagName,name,isDraft,isImmutable,isPrerelease,assets > "$DIAG_DIR/release-assets.json"; then
129-
cat "$DIAG_DIR/release-assets.json"
130-
jq -r '
131-
[
132-
.tagName,
133-
.name,
134-
(.isDraft|tostring),
135-
(.isPrerelease|tostring),
136-
(.isImmutable|tostring)
137-
] | @tsv
138-
' "$DIAG_DIR/release-assets.json" | tee "$DIAG_DIR/release-summary.tsv"
139-
jq -r '
140-
.assets[]
141-
| [
142-
.name,
143-
(.size|tostring),
144-
.contentType,
145-
.state,
146-
.updatedAt,
147-
(.downloadCount|tostring),
148-
.url
149-
] | @tsv
150-
' "$DIAG_DIR/release-assets.json" | tee "$DIAG_DIR/release-assets.tsv"
151-
else
152-
echo "release assets unavailable" | tee "$DIAG_DIR/release-assets-missing.txt"
153-
fi
154-
155-
- name: Upload diagnostics
156-
if: always()
157-
run: |
158-
set -euxo pipefail
159-
if [ -d "$DIAG_DIR" ]; then
160-
find "$DIAG_DIR" -maxdepth 1 -type f | sort | tee "$DIAG_DIR/diag-files.txt"
161-
find "$DIAG_DIR" -maxdepth 1 -type f -exec ls -lh {} + | tee "$DIAG_DIR/diag-files-ls.txt"
162-
find "$DIAG_DIR" -maxdepth 1 -type f | wc -l | tee "$DIAG_DIR/diag-file-count.txt"
163-
du -sh "$DIAG_DIR" | tee "$DIAG_DIR/diag-dir-size.txt"
164-
else
165-
echo "diagnostics directory missing"
166-
fi
167-
- name: Upload diagnostics artifact
168-
if: always()
169-
uses: actions/upload-artifact@v4
170-
with:
171-
name: build-diagnostics-${{ github.ref_name }}
172-
path: /tmp/ctk-diagnostics
173-
if-no-files-found: warn

runner/banner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const banner = `
1212
`
1313

1414
// version is the current version of cloudtoolkit
15-
const version = `0.1.8`
15+
const version = `0.2.0`
1616

1717
// showBanner is used to show the banner to the user
1818
func ShowBanner() {

0 commit comments

Comments
 (0)