forked from Archives/fx
Update release script
This commit is contained in:
parent
d7f54a5c80
commit
0d556edd9e
14
.github/workflows/release.mjs
vendored
14
.github/workflows/release.mjs
vendored
@ -8,12 +8,16 @@ let goarch = [
|
||||
'arm64',
|
||||
]
|
||||
|
||||
await Promise.all(
|
||||
goos.flatMap(GOOS =>
|
||||
goarch.map(GOARCH =>
|
||||
$`GOOS=${GOOS} GOARCH=${GOARCH} go build -o fx_${GOOS}_${GOARCH}`)))
|
||||
await $`go test ./...`
|
||||
|
||||
let name = (GOOS, GOARCH) => `fx_${GOOS}_${GOARCH}` + (GOOS === 'windows' ? '.exe' : '')
|
||||
|
||||
await Promise.all(
|
||||
goos.flatMap(GOOS =>
|
||||
goarch.map(GOARCH =>
|
||||
$`gh release upload ${process.env.RELEASE_VERSION} fx_${GOOS}_${GOARCH}`)))
|
||||
$`GOOS=${GOOS} GOARCH=${GOARCH} go build -o ${name(GOOS, GOARCH)}`)))
|
||||
|
||||
await Promise.all(
|
||||
goos.flatMap(GOOS =>
|
||||
goarch.map(GOARCH =>
|
||||
$`gh release upload ${process.env.RELEASE_VERSION} ${name(GOOS, GOARCH)}`)))
|
||||
|
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -23,4 +23,5 @@ jobs:
|
||||
- name: Build and Release
|
||||
env:
|
||||
FORCE_COLOR: 3
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: npx zx .github/workflows/release.mjs
|
||||
|
Loading…
Reference in New Issue
Block a user