summaryrefslogtreecommitdiff
path: root/.github/scripts/build.mjs
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2026-01-30 17:18:31 -0700
committermo khan <mo@mokhan.ca>2026-01-30 17:18:31 -0700
commite4ed0342932b0aa741ee78d9e4fe135eba6e9ca7 (patch)
treef1e7f602cb86e78aedf04185b2c2e1428fc5b8f2 /.github/scripts/build.mjs
parent83be9ddcf82e8a90ea50a9d54c1ebfc3e22ace16 (diff)
initial commit
Diffstat (limited to '.github/scripts/build.mjs')
-rwxr-xr-x.github/scripts/build.mjs33
1 files changed, 0 insertions, 33 deletions
diff --git a/.github/scripts/build.mjs b/.github/scripts/build.mjs
deleted file mode 100755
index 251a036..0000000
--- a/.github/scripts/build.mjs
+++ /dev/null
@@ -1,33 +0,0 @@
-$.verbose = true
-
-const goos = [
- 'linux',
- 'darwin',
- 'windows',
-]
-const goarch = [
- 'amd64',
- 'arm64',
-]
-
-const name = (GOOS, GOARCH) => `gitmal_${GOOS}_${GOARCH}` + (GOOS === 'windows' ? '.exe' : '')
-
-const resp = await fetch('https://api.github.com/repos/antonmedv/gitmal/releases/latest')
-const {tag_name: latest} = await resp.json()
-
-await $`go mod download`
-
-await Promise.all(
- goos.flatMap(GOOS =>
- goarch.map(GOARCH =>
- $`GOOS=${GOOS} GOARCH=${GOARCH} go build -o ${name(GOOS, GOARCH)}`)))
-
-await Promise.all(
- goos.flatMap(GOOS =>
- goarch.map(GOARCH =>
- $`gh release upload ${latest} ${name(GOOS, GOARCH)}`)))
-
-await Promise.all(
- goos.flatMap(GOOS =>
- goarch.map(GOARCH =>
- $`rm ${name(GOOS, GOARCH)}`)))