diff --git a/.github/workflows/pb-create-package.yml b/.github/workflows/pb-create-package.yml index a5116a3..d1ab8d6 100644 --- a/.github/workflows/pb-create-package.yml +++ b/.github/workflows/pb-create-package.yml @@ -32,7 +32,7 @@ jobs: yj-version: 5.1.0 - uses: buildpacks/github-actions/setup-pack@v5.7.2 with: - pack-version: 0.36.0 + pack-version: 0.34.2 - name: Enable pack Experimental if: ${{ false }} run: | diff --git a/scripts/build.sh b/scripts/build.sh index 447e20f..11e6bd6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,19 +1,19 @@ #!/usr/bin/env bash - set -euo pipefail -GOOS="linux" go build -ldflags='-s -w' -o bin/main github.com/initializ-buildpacks/procfile/v5/cmd/main -GOOS="windows" GOARCH="amd64" go build -ldflags='-s -w' -o bin/main.exe github.com/initializ-buildpacks/procfile/v5/cmd/main +GOMOD=$(head -1 go.mod | awk '{print $2}') +GOOS="linux" GOARCH="amd64" go build -ldflags='-s -w' -o linux/amd64/bin/main "$GOMOD/cmd/main" +GOOS="linux" GOARCH="arm64" go build -ldflags='-s -w' -o linux/arm64/bin/main "$GOMOD/cmd/main" if [ "${STRIP:-false}" != "false" ]; then - strip bin/main bin/main.exe + strip linux/amd64/bin/main linux/arm64/bin/main fi if [ "${COMPRESS:-none}" != "none" ]; then - $COMPRESS bin/main bin/main.exe + $COMPRESS linux/amd64/bin/main linux/arm64/bin/main fi -ln -fs main bin/build -ln -fs main bin/detect -ln -fs main.exe bin/build.exe -ln -fs main.exe bin/detect.exe +ln -fs main linux/amd64/bin/build +ln -fs main linux/arm64/bin/build +ln -fs main linux/amd64/bin/detect +ln -fs main linux/arm64/bin/detect \ No newline at end of file