From 5df2d9a4f67b4c99b678fcc78929db22b64dbf0f Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Fri, 18 Nov 2022 15:56:23 +0000 Subject: [PATCH 1/5] Use context with goreleaser key --- .circleci/config.yml | 4 ++++ .circleci/template.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 55d0c4c8f..cdec7a150 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1143,6 +1143,8 @@ workflows: - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - release: name: "Release" + context: + - filecoin-goreleaser-key requires: - "Build ( darwin / amd64 )" - "Build ( linux / amd64 )" @@ -1156,6 +1158,8 @@ workflows: - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - release: name: "Release (dry-run)" + context: + - filecoin-goreleaser-key dry-run: true requires: - "Build ( darwin / amd64 )" diff --git a/.circleci/template.yml b/.circleci/template.yml index 48542b2b9..46b994795 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -838,6 +838,8 @@ workflows: - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - release: name: "Release" + context: + - filecoin-goreleaser-key requires: - "Build ( darwin / amd64 )" - "Build ( linux / amd64 )" @@ -851,6 +853,8 @@ workflows: - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - release: name: "Release (dry-run)" + context: + - filecoin-goreleaser-key dry-run: true requires: - "Build ( darwin / amd64 )" From a0320d0101ca0d0dce42b672ba481e49c0b74821 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Fri, 18 Nov 2022 16:07:12 +0000 Subject: [PATCH 2/5] Use new workspace name in build script --- scripts/build-appimage-bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-appimage-bundle.sh b/scripts/build-appimage-bundle.sh index d99b459b9..d4ce6de77 100755 --- a/scripts/build-appimage-bundle.sh +++ b/scripts/build-appimage-bundle.sh @@ -20,7 +20,7 @@ PID="$!" trap "kill -9 ${PID}" EXIT sleep 30 -cp "../appimage/Lotus-${CIRCLE_TAG}-x86_64.AppImage" . +cp "/tmp/workspace/appimage/Lotus-${CIRCLE_TAG}-x86_64.AppImage" . sha512sum "Lotus-${CIRCLE_TAG}-x86_64.AppImage" > "Lotus-${CIRCLE_TAG}-x86_64.AppImage.sha512" ipfs add -q "Lotus-${CIRCLE_TAG}-x86_64.AppImage" > "Lotus-${CIRCLE_TAG}-x86_64.AppImage.cid" popd From 81d4342d97dfc42be4f7b75006aee2005ce60e31 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Fri, 18 Nov 2022 16:08:13 +0000 Subject: [PATCH 3/5] Remove kubo download after installing Goreleaser checks to make sure we don't have a dirty git state when releasing, which means the kubo download we use to set up IPFS should be removed before release. --- .circleci/config.yml | 1 + .circleci/template.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index cdec7a150..c81941058 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -97,6 +97,7 @@ commands: sudo bash install.sh popd rm -rf kubo + rm kubo_v0.16.0_linux-amd64.tar.gz git_fetch_all_tags: steps: - run: diff --git a/.circleci/template.yml b/.circleci/template.yml index 46b994795..fb76b6348 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -97,6 +97,7 @@ commands: sudo bash install.sh popd rm -rf kubo + rm kubo_v0.16.0_linux-amd64.tar.gz git_fetch_all_tags: steps: - run: From d48b6a053509b3d3bfa42bbca692a27df82003a8 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Fri, 18 Nov 2022 16:28:07 +0000 Subject: [PATCH 4/5] Add binary name to goreleaser build configs Without this name, it assumes all binaries share the name of the project (i.e. lotus), which causes them all to get renamed and collide when generating the archive. --- .goreleaser.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fea3191d8..021945acf 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -13,6 +13,7 @@ universal_binaries: builds: - id: lotus + binary: lotus builder: prebuilt goos: - darwin @@ -28,6 +29,7 @@ builds: prebuilt: path: /tmp/workspace/{{ .Os }}_{{ .Arch }}{{ with .Amd64 }}_{{ . }}{{ end }}/lotus - id: lotus-miner + binary: lotus-miner builder: prebuilt goos: - darwin @@ -43,6 +45,7 @@ builds: prebuilt: path: /tmp/workspace/{{ .Os }}_{{ .Arch }}{{ with .Amd64 }}_{{ . }}{{ end }}/lotus-miner - id: lotus-worker + binary: lotus-worker builder: prebuilt goos: - darwin From 0fd73272ea7a01287e4becb8bcf27a9e1001d963 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Fri, 18 Nov 2022 16:32:27 +0000 Subject: [PATCH 5/5] Turn on goreleaser debug logging This will give us much more detailed information in the release job, so we can more easily debug issues when they occur. --- .circleci/config.yml | 4 ++-- .circleci/template.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c81941058..4338c7937 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -385,13 +385,13 @@ jobs: - when: condition: << parameters.dry-run >> steps: - - run: goreleaser release --rm-dist --snapshot + - run: goreleaser release --rm-dist --snapshot --debug - run: ./scripts/generate-checksums.sh - when: condition: not: << parameters.dry-run >> steps: - - run: goreleaser release --rm-dist + - run: goreleaser release --rm-dist --debug - run: ./scripts/generate-checksums.sh - run: ./scripts/publish-checksums.sh diff --git a/.circleci/template.yml b/.circleci/template.yml index fb76b6348..62daa347c 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -385,13 +385,13 @@ jobs: - when: condition: << parameters.dry-run >> steps: - - run: goreleaser release --rm-dist --snapshot + - run: goreleaser release --rm-dist --snapshot --debug - run: ./scripts/generate-checksums.sh - when: condition: not: << parameters.dry-run >> steps: - - run: goreleaser release --rm-dist + - run: goreleaser release --rm-dist --debug - run: ./scripts/generate-checksums.sh - run: ./scripts/publish-checksums.sh