diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index cc3f383..bbbadc4 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -85,15 +85,45 @@ jobs: "name": "jam-darwin", "content_type": "application/octet-stream" }, + { + "path": "build/jam-darwin", + "name": "jam-darwin-amd64", + "content_type": "application/octet-stream" + }, + { + "path": "build/jam-darwin-arm64", + "name": "jam-darwin-arm64", + "content_type": "application/octet-stream" + }, { "path": "build/jam-linux", "name": "jam-linux", "content_type": "application/octet-stream" }, + { + "path": "build/jam-linux", + "name": "jam-linux-amd64", + "content_type": "application/octet-stream" + }, + { + "path": "build/jam-linux-arm64", + "name": "jam-linux-arm64", + "content_type": "application/octet-stream" + }, { "path": "build/jam-windows.exe", "name": "jam-windows.exe", "content_type": "application/octet-stream" + }, + { + "path": "build/jam-windows.exe", + "name": "jam-windows-amd64.exe", + "content_type": "application/octet-stream" + }, + { + "path": "build/jam-windows-arm64.exe", + "name": "jam-windows-arm64.exe", + "content_type": "application/octet-stream" } ] diff --git a/scripts/package.sh b/scripts/package.sh index 352e0d3..6c6b88b 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -63,23 +63,28 @@ function build::jam(){ pushd "${ROOT_DIR}" > /dev/null || return for os in darwin linux windows; do - util::print::info "Building jam on ${os}" - - local output - output="${ARTIFACTS_DIR}/jam-${os}" - if [[ "${os}" == "windows" ]]; then - output="${output}.exe" - fi - - GOOS="${os}" \ - GOARCH="amd64" \ - CGO_ENABLED=0 \ - go build \ - -ldflags "-X github.com/paketo-buildpacks/jam/v2/commands.jamVersion=${version}" \ - -o "${output}" \ - main.go - - chmod +x "${output}" + for arch in amd64 arm64; do + util::print::info "Building jam on ${os} for ${arch}" + + local output + output="${ARTIFACTS_DIR}/jam-${os}" + if [[ "${arch}" != "amd64" ]]; then + output="${output}-${arch}" + fi + if [[ "${os}" == "windows" ]]; then + output="${output}.exe" + fi + + GOOS="${os}" \ + GOARCH="${arch}" \ + CGO_ENABLED=0 \ + go build \ + -ldflags "-X github.com/paketo-buildpacks/jam/v2/commands.jamVersion=${version}" \ + -o "${output}" \ + main.go + + chmod +x "${output}" + done done popd > /dev/null || return }