From ecef0b6361add3950e1a204f2df59c5ef42fdd63 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Thu, 3 Nov 2022 14:51:20 +0000 Subject: [PATCH] Fix goreleaser release workflow --- .circleci/config.yml | 34 +++++++++++----------------------- .circleci/template.yml | 34 +++++++++++----------------------- .goreleaser.yaml | 4 ---- 3 files changed, 22 insertions(+), 50 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a3a85dd6a..b4f7e362b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -67,7 +67,7 @@ commands: - run: go version - run: name: Install dependencies with Homebrew - command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config goreleaser/tap/goreleaser-pro coreutils jq hwloc + command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config coreutils jq hwloc - run: name: Install Rust command: | @@ -91,28 +91,12 @@ commands: install_ipfs: steps: - run: | - apt update - apt install -y wget - wget https://github.com/ipfs/go-ipfs/releases/download/v0.12.2/go-ipfs_v0.12.2_linux-amd64.tar.gz - wget https://github.com/ipfs/go-ipfs/releases/download/v0.12.2/go-ipfs_v0.12.2_linux-amd64.tar.gz.sha512 - if [ "$(sha512sum go-ipfs_v0.12.2_linux-amd64.tar.gz)" != "$(cat go-ipfs_v0.12.2_linux-amd64.tar.gz.sha512)" ] - then - echo "ipfs failed checksum check" - exit 1 - fi - tar -xf go-ipfs_v0.12.2_linux-amd64.tar.gz - mv go-ipfs/ipfs /usr/local/bin/ipfs - chmod +x /usr/local/bin/ipfs - install_ipfs_macos: - steps: - - run: | - curl -O https://dist.ipfs.io/kubo/v0.14.0/kubo_v0.14.0_darwin-amd64.tar.gz - tar -xvzf kubo_v0.14.0_darwin-amd64.tar.gz + curl -O https://dist.ipfs.tech/kubo/v0.16.0/kubo_v0.16.0_linux-amd64.tar.gz + tar -xvzf kubo_v0.16.0_linux-amd64.tar.gz pushd kubo sudo bash install.sh popd - rm -rf kubo/ - rm kubo_v0.14.0_darwin-amd64.tar.gz + rm -rf kubo git_fetch_all_tags: steps: - run: @@ -339,7 +323,6 @@ jobs: - prepare: linux: false darwin: true - - install_ipfs_macos - restore_cache: name: restore cargo cache key: v3-go-deps-{{ arch }}-{{ checksum "~/go/src/github.com/filecoin-project/lotus/go.sum" }} @@ -368,7 +351,6 @@ jobs: - prepare: linux: false darwin: true - - install_ipfs_macos - restore_cache: name: restore cargo cache key: v3-go-deps-{{ arch }}-{{ checksum "~/go/src/github.com/filecoin-project/lotus/go.sum" }} @@ -394,7 +376,7 @@ jobs: when: always - run: name: cleanup homebrew - command: HOMEBREW_NO_AUTO_UPDATE=1 brew uninstall pkg-config goreleaser/tap/goreleaser-pro coreutils jq hwloc + command: HOMEBREW_NO_AUTO_UPDATE=1 brew uninstall pkg-config coreutils jq hwloc when: always release: @@ -405,6 +387,12 @@ jobs: description: should this release actually publish it's artifacts? type: boolean steps: + - checkout + - run: | + echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list + sudo apt update + sudo apt install goreleaser-pro + - install_ipfs - attach_workspace: at: /tmp/workspace - when: diff --git a/.circleci/template.yml b/.circleci/template.yml index 08c735f00..086900f37 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -67,7 +67,7 @@ commands: - run: go version - run: name: Install dependencies with Homebrew - command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config goreleaser/tap/goreleaser-pro coreutils jq hwloc + command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config coreutils jq hwloc - run: name: Install Rust command: | @@ -91,28 +91,12 @@ commands: install_ipfs: steps: - run: | - apt update - apt install -y wget - wget https://github.com/ipfs/go-ipfs/releases/download/v0.12.2/go-ipfs_v0.12.2_linux-amd64.tar.gz - wget https://github.com/ipfs/go-ipfs/releases/download/v0.12.2/go-ipfs_v0.12.2_linux-amd64.tar.gz.sha512 - if [ "$(sha512sum go-ipfs_v0.12.2_linux-amd64.tar.gz)" != "$(cat go-ipfs_v0.12.2_linux-amd64.tar.gz.sha512)" ] - then - echo "ipfs failed checksum check" - exit 1 - fi - tar -xf go-ipfs_v0.12.2_linux-amd64.tar.gz - mv go-ipfs/ipfs /usr/local/bin/ipfs - chmod +x /usr/local/bin/ipfs - install_ipfs_macos: - steps: - - run: | - curl -O https://dist.ipfs.io/kubo/v0.14.0/kubo_v0.14.0_darwin-amd64.tar.gz - tar -xvzf kubo_v0.14.0_darwin-amd64.tar.gz + curl -O https://dist.ipfs.tech/kubo/v0.16.0/kubo_v0.16.0_linux-amd64.tar.gz + tar -xvzf kubo_v0.16.0_linux-amd64.tar.gz pushd kubo sudo bash install.sh popd - rm -rf kubo/ - rm kubo_v0.14.0_darwin-amd64.tar.gz + rm -rf kubo git_fetch_all_tags: steps: - run: @@ -339,7 +323,6 @@ jobs: - prepare: linux: false darwin: true - - install_ipfs_macos - restore_cache: name: restore cargo cache key: v3-go-deps-{{ arch }}-{{ checksum "~/go/src/github.com/filecoin-project/lotus/go.sum" }} @@ -368,7 +351,6 @@ jobs: - prepare: linux: false darwin: true - - install_ipfs_macos - restore_cache: name: restore cargo cache key: v3-go-deps-{{ arch }}-{{ checksum "~/go/src/github.com/filecoin-project/lotus/go.sum" }} @@ -394,7 +376,7 @@ jobs: when: always - run: name: cleanup homebrew - command: HOMEBREW_NO_AUTO_UPDATE=1 brew uninstall pkg-config goreleaser/tap/goreleaser-pro coreutils jq hwloc + command: HOMEBREW_NO_AUTO_UPDATE=1 brew uninstall pkg-config coreutils jq hwloc when: always release: @@ -405,6 +387,12 @@ jobs: description: should this release actually publish it's artifacts? type: boolean steps: + - checkout + - run: | + echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list + sudo apt update + sudo apt install goreleaser-pro + - install_ipfs - attach_workspace: at: /tmp/workspace - when: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index bf7682087..1871406c0 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,8 +1,4 @@ project_name: lotus -before: - hooks: - - go mod tidy - - make deps universal_binaries: - id: lotus