Add release script

sleep-stdin-bug
Anton Medvedev 2 years ago
parent 804becbdb5
commit d7f54a5c80

@ -0,0 +1,19 @@
let goos = [
'linux',
'darwin',
'windows',
]
let goarch = [
'amd64',
'arm64',
]
await Promise.all(
goos.flatMap(GOOS =>
goarch.map(GOARCH =>
$`GOOS=${GOOS} GOARCH=${GOARCH} go build -o fx_${GOOS}_${GOARCH}`)))
await Promise.all(
goos.flatMap(GOOS =>
goarch.map(GOARCH =>
$`gh release upload ${process.env.RELEASE_VERSION} fx_${GOOS}_${GOARCH}`)))

@ -17,10 +17,10 @@ jobs:
with:
go-version: 1.18
- name: Build and release
- name: Version
run: echo "RELEASE_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Build and Release
env:
FORCE_COLOR: 3
run: |
npx zx <<'EOF'
await $`go build -o fx`
EOF
run: npx zx .github/workflows/release.mjs

Loading…
Cancel
Save