fix: target

pull/269/head
zijiren233 1 year ago
parent b6fa067023
commit f7bd944b21

@ -13,29 +13,40 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
get-targets:
name: Get all targets
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.get-targets.outputs.targets }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get targets
id: get-targets
uses: zijiren233/go-build-action@v1
with:
show-all-targets: true
build-targets:
name: Build
runs-on: ubuntu-latest
needs: get-targets
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.get-targets.outputs.targets) }}
target:
- linux/386
- linux/amd64
- linux/arm
- linux/arm64
- linux/loong64
- linux/ppc64le
- linux/riscv64
- linux/s390x
- darwin/amd64
- darwin/arm64
- windows/386
- windows/amd64
- windows/arm
- windows/arm64
- freebsd/386
- freebsd/amd64
- freebsd/arm
- freebsd/arm64
- freebsd/riscv64
- openbsd/386
- openbsd/amd64
- openbsd/arm
- openbsd/arm64
- netbsd/386
- netbsd/amd64
- netbsd/arm
- netbsd/arm64
steps:
- name: Checkout
uses: actions/checkout@v4

@ -38,16 +38,6 @@ function printDepEnvHelp() {
echo -e " ${COLOR_LIGHT_GREEN}SKIP_INIT_WEB${COLOR_RESET} - Skip initializing the web dependency (set to any non-empty value to enable)"
}
function initDepTargets() {
clearAllowedTargets
addAllowedTargets "linux/386,linux/amd64,linux/arm,linux/arm64,linux/loong64,linux/ppc64le,linux/riscv64,linux/s390x"
addAllowedTargets "darwin/amd64,darwin/arm64"
addAllowedTargets "windows/386,windows/amd64"
addAllowedTargets "${GOHOSTOS}/${GOHOSTARCH}"
}
function initDep() {
setDefault "VERSION" "dev"
VERSION="$(echo "$VERSION" | sed 's/ //g' | sed 's/"//g' | sed 's/\n//g')"

Loading…
Cancel
Save