mirror of
https://github.com/antonmedv/fx
synced 2024-11-01 21:40:20 +00:00
Add release script
This commit is contained in:
parent
804becbdb5
commit
d7f54a5c80
19
.github/workflows/release.mjs
vendored
Normal file
19
.github/workflows/release.mjs
vendored
Normal file
@ -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}`)))
|
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@ -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…
Reference in New Issue
Block a user