From 1469efd1406768ecedbfaaa4a4fc3476f3bb33b9 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Tue, 23 Aug 2022 13:45:32 +0200 Subject: [PATCH 01/64] sign and notarize (wip) --- .github/workflows/release.yml | 6 +++++- .goreleaser.yaml | 20 ++++++++++++++++---- gon.hcl | 15 +++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 gon.hcl diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f0a6f2..241be06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,9 +11,13 @@ permissions: # packages: write # issues: write + jobs: goreleaser: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - name: Checkout diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ea4efdb..eb916b0 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -7,17 +7,29 @@ before: # you may remove this if you don't need go generate - go generate ./... builds: - - env: - - CGO_ENABLED=0 + - binary: saturn-L2-node + id: saturn-L2-node goos: - linux - windows - - darwin ignore: - goos: windows goarch: arm64 main: ./cmd/saturn-l2 - binary: saturn-L2-node + env: + - CGO_ENABLED=0 + - binary: saturn-L2-node + id: saturn-L2-node-macos + goos: + - darwin + goarch: + - amd64 + hooks: + post: + - gon gon.hcl + main: ./cmd/saturn-l2 + env: + - CGO_ENABLED=0 archives: - replacements: diff --git a/gon.hcl b/gon.hcl new file mode 100644 index 0000000..e1d3c77 --- /dev/null +++ b/gon.hcl @@ -0,0 +1,15 @@ +# gon.hcl +# +# The path follows a pattern +# ./dist/BUILD-ID_TARGET/BINARY-NAME +source = ["./dist/saturn-L2-node-macos_darwin_amd64/saturn-L2-node"] +bundle_id = "filecoin.saturn.l2-node" + +apple_id { + username = "@env:AC_USERNAME" + password = "@env:AC_PASSWORD" +} + +sign { + application_identity = "Developer ID Application: @env:AC_FULLNAME" +} From 961ce4f66790ff5aedc2af127cdeb2d3f8a20a82 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Tue, 23 Aug 2022 13:47:25 +0200 Subject: [PATCH 02/64] always run for now --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 241be06..33d14a8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,17 +1,17 @@ name: goreleaser on: + pull_request: push: # run only against tags - tags: - - '*' + # tags: + # - '*' permissions: contents: write # packages: write # issues: write - jobs: goreleaser: strategy: From 339bce4d8a6dcdd3d3fc5142a9f04b4b4a2b266d Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Tue, 23 Aug 2022 14:07:52 +0200 Subject: [PATCH 03/64] add install gon --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33d14a8..f3b0bb2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,12 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.18 + - + name: Install gon + if: matrix.os == 'macos-latest' + run: | + brew tap mitchellh/gon + brew install mitchellh/gon/gon - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 From 3ab35f572dcaeabb8a5311773a4d06f3902e51e0 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Tue, 23 Aug 2022 14:19:51 +0200 Subject: [PATCH 04/64] try fixing the rate limiting issue --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3b0bb2..cb45b85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,7 @@ jobs: tag: v0.0.19 fileName: saturn-webui.tar.gz out-file-path: resources/webui + token: ${{ secrets.GITHUB_TOKEN }} - name: Unpack web UI archive run: | From ca45b572b1f9060ef346b180601a2fa4a58deefc Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 13:27:01 +0200 Subject: [PATCH 05/64] just always run on macos --- .github/workflows/release.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb45b85..d9d9d22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,10 +14,7 @@ permissions: jobs: goreleaser: - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} + runs-on: macos-latest steps: - name: Checkout @@ -50,7 +47,6 @@ jobs: go-version: 1.18 - name: Install gon - if: matrix.os == 'macos-latest' run: | brew tap mitchellh/gon brew install mitchellh/gon/gon From 51db4f7740a39e25b6908193966809681e246183 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 14:11:44 +0200 Subject: [PATCH 06/64] change gon invocation --- .goreleaser.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index eb916b0..1cd7dde 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -24,12 +24,16 @@ builds: - darwin goarch: - amd64 - hooks: - post: - - gon gon.hcl main: ./cmd/saturn-l2 env: - CGO_ENABLED=0 +signs: + - ids: + - saturn-L2-node-macos + cmd: gon + args: + - gon.hcl + artifacts: all archives: - replacements: From b2f93da166431094dbdee5121897dc6862b113ba Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 14:26:00 +0200 Subject: [PATCH 07/64] try again after updating env From 8404587721939ea05b88309200a1cec4ffc4e5ed Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 14:29:29 +0200 Subject: [PATCH 08/64] try again after updating env From 44e8bc8b4caafea0c272f22f431c1410653af278 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 14:36:25 +0200 Subject: [PATCH 09/64] try again after updating env From 8a19a8bea93a0ef54716dca1905a2ad2ad2b323b Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 14:48:22 +0200 Subject: [PATCH 10/64] try again after updating env From 9ac4fa738a22936ccbf88327856ed6f4092921d6 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 14:58:31 +0200 Subject: [PATCH 11/64] pass secrets to env --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9d9d22..4a7a7e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,5 +60,8 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AC_USERNAME: ${{ secrets.AC_USERNAME }} + AC_PASSWORD: ${{ secrets.AC_PASSWORD }} + AC_FULLNAME: ${{ secrets.AC_FULLNAME }} # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} From 321ceb16242168b074b70f27090be7e68e9104c5 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 15:25:27 +0200 Subject: [PATCH 12/64] import cert into keychain --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a7a7e1..ddd7c29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,6 +50,28 @@ jobs: run: | brew tap mitchellh/gon brew install mitchellh/gon/gon + - + name: Install the Apple certificate and provisioning profile + env: + BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: | + # create variables + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 + KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + + # import certificate and provisioning profile from secrets + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH + + # create temporary keychain + security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + + # import certificate to keychain + security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 From b008d74d8a9a0e85e10985828ccfa40c79bc911f Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 15:39:57 +0200 Subject: [PATCH 13/64] just pass the cert name (no secret) --- .github/workflows/release.yml | 1 - gon.hcl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ddd7c29..44c6d80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,6 +84,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} AC_USERNAME: ${{ secrets.AC_USERNAME }} AC_PASSWORD: ${{ secrets.AC_PASSWORD }} - AC_FULLNAME: ${{ secrets.AC_FULLNAME }} # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/gon.hcl b/gon.hcl index e1d3c77..f32e512 100644 --- a/gon.hcl +++ b/gon.hcl @@ -11,5 +11,5 @@ apple_id { } sign { - application_identity = "Developer ID Application: @env:AC_FULLNAME" + application_identity = "Developer ID Application: Protocol Labs, Inc." } From 117c37db1786020bdb2a860dd5f62e0819fe12f6 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 15:46:30 +0200 Subject: [PATCH 14/64] fix build id --- gon.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gon.hcl b/gon.hcl index f32e512..085be52 100644 --- a/gon.hcl +++ b/gon.hcl @@ -2,7 +2,7 @@ # # The path follows a pattern # ./dist/BUILD-ID_TARGET/BINARY-NAME -source = ["./dist/saturn-L2-node-macos_darwin_amd64/saturn-L2-node"] +source = ["./dist/saturn-L2-node-macos/saturn-L2-node"] bundle_id = "filecoin.saturn.l2-node" apple_id { From 5e25d283f655567a0f846fde3d093cc6f878861f Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 15:50:34 +0200 Subject: [PATCH 15/64] fix build id --- gon.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gon.hcl b/gon.hcl index 085be52..fc00b3c 100644 --- a/gon.hcl +++ b/gon.hcl @@ -2,7 +2,7 @@ # # The path follows a pattern # ./dist/BUILD-ID_TARGET/BINARY-NAME -source = ["./dist/saturn-L2-node-macos/saturn-L2-node"] +source = ["./dist/saturn-L2-node-macos_darwin_amd64_v1/saturn-L2-node"] bundle_id = "filecoin.saturn.l2-node" apple_id { From 0e475b35a6a7df128c2011d3e4a5341a8a2f81b1 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 15:56:58 +0200 Subject: [PATCH 16/64] build on all darwin architectures --- .goreleaser.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1cd7dde..8131c13 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -22,8 +22,6 @@ builds: id: saturn-L2-node-macos goos: - darwin - goarch: - - amd64 main: ./cmd/saturn-l2 env: - CGO_ENABLED=0 From 0a5b788ffc7e5faa60aa81cf2767a4c90568972b Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 16:03:14 +0200 Subject: [PATCH 17/64] add sign arm64 --- gon.hcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gon.hcl b/gon.hcl index fc00b3c..8ce7ca1 100644 --- a/gon.hcl +++ b/gon.hcl @@ -2,7 +2,10 @@ # # The path follows a pattern # ./dist/BUILD-ID_TARGET/BINARY-NAME -source = ["./dist/saturn-L2-node-macos_darwin_amd64_v1/saturn-L2-node"] +source = [ + "./dist/saturn-L2-node-macos_darwin_amd64_v1/saturn-L2-node" + "./dist/saturn-L2-node-macos_darwin_arm64/saturn-L2-node" +] bundle_id = "filecoin.saturn.l2-node" apple_id { From aacb545f01bcb83918aa16184fa0725eb0c1f60c Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 16:07:45 +0200 Subject: [PATCH 18/64] fix hcl syntax --- gon.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gon.hcl b/gon.hcl index 8ce7ca1..2d5716b 100644 --- a/gon.hcl +++ b/gon.hcl @@ -3,7 +3,7 @@ # The path follows a pattern # ./dist/BUILD-ID_TARGET/BINARY-NAME source = [ - "./dist/saturn-L2-node-macos_darwin_amd64_v1/saturn-L2-node" + "./dist/saturn-L2-node-macos_darwin_amd64_v1/saturn-L2-node", "./dist/saturn-L2-node-macos_darwin_arm64/saturn-L2-node" ] bundle_id = "filecoin.saturn.l2-node" From 6e1934f1cf579842a01dffa4ab479f4a63540b76 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 16:16:03 +0200 Subject: [PATCH 19/64] undo debug changes --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 44c6d80..ca43f1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,10 @@ name: goreleaser on: - pull_request: push: # run only against tags - # tags: - # - '*' + tags: + - '*' permissions: contents: write From 17c7153e648659ee256730c9edb2c611f2d96eac Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 29 Aug 2022 16:17:04 +0200 Subject: [PATCH 20/64] clean up --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca43f1d..c0b0a8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: push: # run only against tags tags: - - '*' + - '*' permissions: contents: write From 32471d1bfe68c55a102900399df115b477e7ac8b Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Thu, 1 Sep 2022 14:49:47 +0200 Subject: [PATCH 21/64] attach artifacts to workflow run --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0b0a8f..877b0b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,3 +85,10 @@ jobs: AC_PASSWORD: ${{ secrets.AC_PASSWORD }} # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + - + name: Attach produced packages to Github Action + uses: actions/upload-artifact@v2 + with: + name: dist + path: dist/*.tar.gz + if-no-files-found: error From fb557addb69ccf6a71042acd63f763097feaf307 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Thu, 1 Sep 2022 14:50:43 +0200 Subject: [PATCH 22/64] run on push again --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 877b0b2..88b647b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,8 @@ name: goreleaser on: push: # run only against tags - tags: - - '*' + # tags: + # - '*' permissions: contents: write From 4360fc6ac8cf0851b69c383a10866b454a69c51d Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 5 Sep 2022 13:36:16 +0200 Subject: [PATCH 23/64] clean up --- gon.hcl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gon.hcl b/gon.hcl index 2d5716b..89a9e33 100644 --- a/gon.hcl +++ b/gon.hcl @@ -1,7 +1,3 @@ -# gon.hcl -# -# The path follows a pattern -# ./dist/BUILD-ID_TARGET/BINARY-NAME source = [ "./dist/saturn-L2-node-macos_darwin_amd64_v1/saturn-L2-node", "./dist/saturn-L2-node-macos_darwin_arm64/saturn-L2-node" From 11d5ebe7d3d68f6750faa3b1fddadc90480cb47c Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 5 Sep 2022 13:40:32 +0200 Subject: [PATCH 24/64] update bundle id --- gon.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gon.hcl b/gon.hcl index 89a9e33..64bbd33 100644 --- a/gon.hcl +++ b/gon.hcl @@ -2,7 +2,7 @@ source = [ "./dist/saturn-L2-node-macos_darwin_amd64_v1/saturn-L2-node", "./dist/saturn-L2-node-macos_darwin_arm64/saturn-L2-node" ] -bundle_id = "filecoin.saturn.l2-node" +bundle_id = "saturn.filecoin.l2-node" apple_id { username = "@env:AC_USERNAME" From 6ff3388c820abacb3cc8c679def7d6c6494b5714 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 5 Sep 2022 13:40:43 +0200 Subject: [PATCH 25/64] use hooks instead of signs --- .goreleaser.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8131c13..bd19b6c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -25,13 +25,9 @@ builds: main: ./cmd/saturn-l2 env: - CGO_ENABLED=0 -signs: - - ids: - - saturn-L2-node-macos - cmd: gon - args: - - gon.hcl - artifacts: all + hooks: + post: + - gon gon.hcl archives: - replacements: From ccc11b3a5081d5af5f853637bb5909545b5c78ee Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 5 Sep 2022 13:41:11 +0200 Subject: [PATCH 26/64] turn gon config into dotfile --- gon.hcl => .gon.hcl | 0 .goreleaser.yaml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename gon.hcl => .gon.hcl (100%) diff --git a/gon.hcl b/.gon.hcl similarity index 100% rename from gon.hcl rename to .gon.hcl diff --git a/.goreleaser.yaml b/.goreleaser.yaml index bd19b6c..caba8d4 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -27,7 +27,7 @@ builds: - CGO_ENABLED=0 hooks: post: - - gon gon.hcl + - gon .gon.hcl archives: - replacements: From 351edeff0defc4e7c5d24b4ba210a9862b078732 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 5 Sep 2022 13:49:45 +0200 Subject: [PATCH 27/64] add zip output --- .gon.hcl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gon.hcl b/.gon.hcl index 64bbd33..5e2bf77 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -12,3 +12,7 @@ apple_id { sign { application_identity = "Developer ID Application: Protocol Labs, Inc." } + +zip { + output_path="./dist/saturn-L2-node.zip" +} \ No newline at end of file From 61862d599c6933089f0022835e42c8ea62e1e449 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 10:09:04 +0200 Subject: [PATCH 28/64] try "signs" again --- .goreleaser.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index caba8d4..68c4d2f 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -25,9 +25,13 @@ builds: main: ./cmd/saturn-l2 env: - CGO_ENABLED=0 - hooks: - post: - - gon .gon.hcl +signs: + - ids: + - saturn-L2-node-macos + cmd: gon + args: + - .gon.hcl + artifacts: all archives: - replacements: From 17de71bf9992fe536f75dce2c057d3b46a27a6c5 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 10:56:27 +0200 Subject: [PATCH 29/64] try mirroring mitchellh/gon setup --- .gon.hcl | 12 ++++---- .goreleaser.yaml | 73 ++++++++++++++++++++++-------------------------- 2 files changed, 40 insertions(+), 45 deletions(-) diff --git a/.gon.hcl b/.gon.hcl index 5e2bf77..7b9ad2c 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -1,7 +1,4 @@ -source = [ - "./dist/saturn-L2-node-macos_darwin_amd64_v1/saturn-L2-node", - "./dist/saturn-L2-node-macos_darwin_arm64/saturn-L2-node" -] +source = ["./dist/macos_darwin_amd64/saturn-L2-node"] bundle_id = "saturn.filecoin.l2-node" apple_id { @@ -14,5 +11,10 @@ sign { } zip { - output_path="./dist/saturn-L2-node.zip" + output_path="./dist/saturn-L2-node_macos.zip" +} + +dmg { + output_path="./dist/saturn-L2-node_macos.dmg" + volume_name="saturn-L2-node" } \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 68c4d2f..41d81d2 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,62 +1,55 @@ -# This is an example .goreleaser.yml file with some sensible defaults. -# Make sure to check the documentation at https://goreleaser.com +env: + - GO111MODULE=on + before: hooks: # You may remove this if you don't use go modules. - go mod tidy # you may remove this if you don't need go generate - go generate ./... + builds: - - binary: saturn-L2-node - id: saturn-L2-node - goos: - - linux - - windows - ignore: - - goos: windows - goarch: arm64 - main: ./cmd/saturn-l2 + - id: macos env: - CGO_ENABLED=0 - - binary: saturn-L2-node - id: saturn-L2-node-macos goos: - - darwin + - darwin + goarch: + - amd64 main: ./cmd/saturn-l2 - env: - - CGO_ENABLED=0 + +archives: + - id: macos-zip + format: zip + name_template: "{{ .ProjectName }}_{{ .Os }}" + replacements: + darwin: macos + amd64: x86_64 + +checksum: + disable: true + signs: - - ids: - - saturn-L2-node-macos + - signature: "${artifact}_macos.dmg" + ids: + - macos-zip cmd: gon args: - - .gon.hcl + - .gon.hcl artifacts: all -archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 -checksum: - name_template: 'checksums.txt' snapshot: - name_template: "{{ incpatch .Version }}-next" + name_template: "{{ .Tag }}-next" + changelog: sort: asc - groups: - - title: Features - regexp: "^.*feat[(\\w)]*:+.*$" - order: 0 - - title: 'Bug fixes' - regexp: "^.*fix[(\\w)]*:+.*$" - order: 1 - - title: Others - order: 999 filters: exclude: - - '^docs:' - - '^test:' + - 'README' +release: + ids: + - none + extra_files: + - glob: ./dist/gon_macos.dmg + - glob: ./dist/gon_macos.zip \ No newline at end of file From 07a15396de015e9ba67374597dc41b2f19ae85b0 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 10:59:09 +0200 Subject: [PATCH 30/64] update paths --- .gon.hcl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gon.hcl b/.gon.hcl index 7b9ad2c..15e26f7 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -1,4 +1,4 @@ -source = ["./dist/macos_darwin_amd64/saturn-L2-node"] +source = ["./dist/macos_darwin_amd64/L2-node"] bundle_id = "saturn.filecoin.l2-node" apple_id { @@ -11,10 +11,10 @@ sign { } zip { - output_path="./dist/saturn-L2-node_macos.zip" + output_path="./dist/L2-node_macos.zip" } dmg { - output_path="./dist/saturn-L2-node_macos.dmg" + output_path="./dist/L2-node_macos.dmg" volume_name="saturn-L2-node" } \ No newline at end of file From 326513def8d346a8f59ff559f88318671b61536b Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 11:02:20 +0200 Subject: [PATCH 31/64] :thinking: --- .gon.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gon.hcl b/.gon.hcl index 15e26f7..c0585aa 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -1,4 +1,4 @@ -source = ["./dist/macos_darwin_amd64/L2-node"] +source = ["./dist/macos_darwin_amd64_v1/L2-node"] bundle_id = "saturn.filecoin.l2-node" apple_id { From 405b9d8ae7daf1a4d927e5f24aa689d127d532df Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 11:08:19 +0200 Subject: [PATCH 32/64] looks like username needs to be hardcoded --- .gon.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gon.hcl b/.gon.hcl index c0585aa..e95d5fd 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -2,7 +2,7 @@ source = ["./dist/macos_darwin_amd64_v1/L2-node"] bundle_id = "saturn.filecoin.l2-node" apple_id { - username = "@env:AC_USERNAME" + username = "oli@protocol.ai" password = "@env:AC_PASSWORD" } From 57b46d44ce3f0a6d2f6fb6f58607f474ef95252d Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 11:08:54 +0200 Subject: [PATCH 33/64] clean up --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88b647b..e886910 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,7 +81,6 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - AC_USERNAME: ${{ secrets.AC_USERNAME }} AC_PASSWORD: ${{ secrets.AC_PASSWORD }} # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} From b412d6464efcb0675a41d91b1d9f5d16bc5a2e15 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 11:41:03 +0200 Subject: [PATCH 34/64] attach everything from `./dist` --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e886910..81e868d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,5 +89,5 @@ jobs: uses: actions/upload-artifact@v2 with: name: dist - path: dist/*.tar.gz + path: dist/* if-no-files-found: error From 1b389f8d4c8509649c3b80e18f27a757713670d3 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 11:56:53 +0200 Subject: [PATCH 35/64] remove unnecessary dmg artifact --- .gon.hcl | 5 ----- .goreleaser.yaml | 1 - 2 files changed, 6 deletions(-) diff --git a/.gon.hcl b/.gon.hcl index e95d5fd..43e6452 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -13,8 +13,3 @@ sign { zip { output_path="./dist/L2-node_macos.zip" } - -dmg { - output_path="./dist/L2-node_macos.dmg" - volume_name="saturn-L2-node" -} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 41d81d2..82bdf47 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -51,5 +51,4 @@ release: ids: - none extra_files: - - glob: ./dist/gon_macos.dmg - glob: ./dist/gon_macos.zip \ No newline at end of file From 4c5a6aae028e6e725be5abca8648541f2c45028d Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 12:03:53 +0200 Subject: [PATCH 36/64] undo some changes --- .goreleaser.yaml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 82bdf47..1e51522 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,17 +1,26 @@ -env: - - GO111MODULE=on - +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com before: hooks: # You may remove this if you don't use go modules. - go mod tidy # you may remove this if you don't need go generate - go generate ./... - builds: - - id: macos - env: + - env: + - CGO_ENABLED=0 + id: saturn + goos: + - linux + - windows + ignore: + - goos: windows + goarch: arm64 + main: ./cmd/saturn-l2 + binary: saturn-L2-node + - env: - CGO_ENABLED=0 + id: macos goos: - darwin goarch: @@ -30,8 +39,7 @@ checksum: disable: true signs: - - signature: "${artifact}_macos.dmg" - ids: + - ids: - macos-zip cmd: gon args: From 245d4ffab376e8228d3c96fec86c6def2d0b276e Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 12:13:30 +0200 Subject: [PATCH 37/64] only archive macos --- .goreleaser.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1e51522..1eea27c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -34,6 +34,8 @@ archives: replacements: darwin: macos amd64: x86_64 + builds: + - macos checksum: disable: true From 8505c29ad93eb02e9151b3e14489ad3817061763 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 13:49:39 +0200 Subject: [PATCH 38/64] undo some changes --- .goreleaser.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1eea27c..a41f771 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -28,6 +28,12 @@ builds: main: ./cmd/saturn-l2 archives: + - replacements: + linux: Linux + windows: Windows + 386: i386 + builds: + - saturn - id: macos-zip format: zip name_template: "{{ .ProjectName }}_{{ .Os }}" @@ -38,7 +44,7 @@ archives: - macos checksum: - disable: true + name_template: 'checksums.txt' signs: - ids: From da949a960452a87a099583b29a99922407e7e92c Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 14:05:42 +0200 Subject: [PATCH 39/64] undo some changes --- .goreleaser.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a41f771..4c35629 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -55,13 +55,22 @@ signs: artifacts: all snapshot: - name_template: "{{ .Tag }}-next" + name_template: "{{ incpatch .Version }}-next" changelog: sort: asc + groups: + - title: Features + regexp: "^.*feat[(\\w)]*:+.*$" + order: 0 + - title: 'Bug fixes' + regexp: "^.*fix[(\\w)]*:+.*$" + order: 1 + - title: Others + order: 999 filters: exclude: - - 'README' + - 'README' release: ids: From 6367b927f376ef50e79df11e39c7752a8865ed81 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 14:07:02 +0200 Subject: [PATCH 40/64] undo some changes --- .goreleaser.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4c35629..5e1d4f9 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -42,10 +42,8 @@ archives: amd64: x86_64 builds: - macos - checksum: name_template: 'checksums.txt' - signs: - ids: - macos-zip @@ -53,10 +51,8 @@ signs: args: - .gon.hcl artifacts: all - snapshot: name_template: "{{ incpatch .Version }}-next" - changelog: sort: asc groups: @@ -70,7 +66,8 @@ changelog: order: 999 filters: exclude: - - 'README' + - '^docs:' + - '^test:' release: ids: From c49d051dbc0e2c4ac19f57cbd34335f8aa7c852a Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 14:15:01 +0200 Subject: [PATCH 41/64] zip -> tar.gz --- .gon.hcl | 2 +- .goreleaser.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gon.hcl b/.gon.hcl index 43e6452..c8de016 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -11,5 +11,5 @@ sign { } zip { - output_path="./dist/L2-node_macos.zip" + output_path="./dist/L2-node_macos.tar.gz" } diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5e1d4f9..1b99ba5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -35,7 +35,7 @@ archives: builds: - saturn - id: macos-zip - format: zip + format: tar.gz name_template: "{{ .ProjectName }}_{{ .Os }}" replacements: darwin: macos From df9cef4f556490eebb7c2f680b7530e52b6f4183 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 14:17:29 +0200 Subject: [PATCH 42/64] add arch to macos artifact --- .gon.hcl | 2 +- .goreleaser.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gon.hcl b/.gon.hcl index c8de016..d311bab 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -11,5 +11,5 @@ sign { } zip { - output_path="./dist/L2-node_macos.tar.gz" + output_path="./dist/L2-node_macos_x86_64.tar.gz" } diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1b99ba5..7b503ae 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -36,7 +36,7 @@ archives: - saturn - id: macos-zip format: tar.gz - name_template: "{{ .ProjectName }}_{{ .Os }}" + name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" replacements: darwin: macos amd64: x86_64 From 2e109f59e60e87ed6df0421642a96c26efe5bbfa Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 14:18:14 +0200 Subject: [PATCH 43/64] remove version from other builds too --- .goreleaser.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 7b503ae..04aca6b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -28,7 +28,8 @@ builds: main: ./cmd/saturn-l2 archives: - - replacements: + - name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" + replacements: linux: Linux windows: Windows 386: i386 From 2de2fc3ffad0178c0c3e7de340ab962d2df7e7a4 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 14:20:19 +0200 Subject: [PATCH 44/64] skip folder artifact upload --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81e868d..bb61c79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,5 +89,5 @@ jobs: uses: actions/upload-artifact@v2 with: name: dist - path: dist/* + path: dist/*.* if-no-files-found: error From 0409e22fd77116fa08d7dee00d05c78b8f592603 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 14:21:22 +0200 Subject: [PATCH 45/64] Revert "zip -> tar.gz" This reverts commit c49d051dbc0e2c4ac19f57cbd34335f8aa7c852a. --- .gon.hcl | 2 +- .goreleaser.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gon.hcl b/.gon.hcl index d311bab..4d85159 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -11,5 +11,5 @@ sign { } zip { - output_path="./dist/L2-node_macos_x86_64.tar.gz" + output_path="./dist/L2-node_macos_x86_64.zip" } diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 04aca6b..19a0f79 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -36,7 +36,7 @@ archives: builds: - saturn - id: macos-zip - format: tar.gz + format: zip name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" replacements: darwin: macos From b5a70e2e4e1cd5d3cef1b57c951486c99a7ecdcf Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 14:22:13 +0200 Subject: [PATCH 46/64] docs --- .goreleaser.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 19a0f79..ca945bc 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -36,6 +36,7 @@ archives: builds: - saturn - id: macos-zip + # apple signs zip,dmg,pkg but not tar.gz format: zip name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" replacements: From 1c63c02f334a4001890717d51d79c09c1ca43058 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 14:30:44 +0200 Subject: [PATCH 47/64] keep previous artifact naming --- .gon.hcl | 2 +- .goreleaser.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gon.hcl b/.gon.hcl index 4d85159..7e46b0f 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -11,5 +11,5 @@ sign { } zip { - output_path="./dist/L2-node_macos_x86_64.zip" + output_path="./dist/L2-node_Darwin_x86_64.zip" } diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ca945bc..d29f9e5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -40,7 +40,7 @@ archives: format: zip name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" replacements: - darwin: macos + darwin: Darwin amd64: x86_64 builds: - macos From dbfb03ea41984df85144ae790b13781737de337f Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 15:06:06 +0200 Subject: [PATCH 48/64] fix artifact name --- .goreleaser.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d29f9e5..245f8cd 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -33,6 +33,7 @@ archives: linux: Linux windows: Windows 386: i386 + amd64: x86_64 builds: - saturn - id: macos-zip From 4a770a4d4366cf2e928b2358d61896881e0f883a Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 15:07:03 +0200 Subject: [PATCH 49/64] build all darwin archs --- .goreleaser.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 245f8cd..2f22fb9 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -23,8 +23,6 @@ builds: id: macos goos: - darwin - goarch: - - amd64 main: ./cmd/saturn-l2 archives: From b60fa2b6be66f465632d3998830d0286bcc004b8 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 15:15:34 +0200 Subject: [PATCH 50/64] sign macos archs independently --- .gon.arm64.hcl | 15 ++++++++++++++ .gon.hcl => .gon.x86_64.hcl | 0 .goreleaser.yaml | 40 ++++++++++++++++++++++++++++--------- 3 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 .gon.arm64.hcl rename .gon.hcl => .gon.x86_64.hcl (100%) diff --git a/.gon.arm64.hcl b/.gon.arm64.hcl new file mode 100644 index 0000000..001b987 --- /dev/null +++ b/.gon.arm64.hcl @@ -0,0 +1,15 @@ +source = ["./dist/macos_darwin_arm64/L2-node"] +bundle_id = "saturn.filecoin.l2-node" + +apple_id { + username = "oli@protocol.ai" + password = "@env:AC_PASSWORD" +} + +sign { + application_identity = "Developer ID Application: Protocol Labs, Inc." +} + +zip { + output_path="./dist/L2-node_Darwin_arm64.zip" +} diff --git a/.gon.hcl b/.gon.x86_64.hcl similarity index 100% rename from .gon.hcl rename to .gon.x86_64.hcl diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2f22fb9..e4a8b1c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -7,9 +7,9 @@ before: # you may remove this if you don't need go generate - go generate ./... builds: - - env: + - id: saturn + env: - CGO_ENABLED=0 - id: saturn goos: - linux - windows @@ -18,11 +18,21 @@ builds: goarch: arm64 main: ./cmd/saturn-l2 binary: saturn-L2-node - - env: + - id: macos-amd64 + env: - CGO_ENABLED=0 - id: macos goos: - darwin + goarch: + - amd64 + main: ./cmd/saturn-l2 + - id: macos-arm64 + env: + - CGO_ENABLED=0 + goos: + - darwin + goarch: + - arm64 main: ./cmd/saturn-l2 archives: @@ -34,23 +44,35 @@ archives: amd64: x86_64 builds: - saturn - - id: macos-zip - # apple signs zip,dmg,pkg but not tar.gz + - id: macos-amd64-zip format: zip name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" replacements: darwin: Darwin amd64: x86_64 builds: - - macos + - macos-amd64 + - id: macos-arm64-zip + format: zip + name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" + replacements: + darwin: Darwin + builds: + - macos-arm64 checksum: name_template: 'checksums.txt' signs: - ids: - - macos-zip + - macos-amd64-zip + cmd: gon + args: + - .gon.x86_64.hcl + artifacts: all + - ids: + - macos-arm64-zip cmd: gon args: - - .gon.hcl + - .gon.arm64.hcl artifacts: all snapshot: name_template: "{{ incpatch .Version }}-next" From e8f889a85806c34f268a30cd136e93888a6921a4 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 15:18:43 +0200 Subject: [PATCH 51/64] refactor, fix redundant signs ids --- .goreleaser.yaml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e4a8b1c..bae6f2e 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -36,39 +36,41 @@ builds: main: ./cmd/saturn-l2 archives: - - name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" + - builds: + - saturn + name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" replacements: linux: Linux windows: Windows 386: i386 amd64: x86_64 - builds: - - saturn - - id: macos-amd64-zip + - builds: + - macos-amd64 + id: macos-amd64-zip format: zip name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" replacements: darwin: Darwin amd64: x86_64 - builds: - - macos-amd64 - - id: macos-arm64-zip + - builds: + - macos-arm64 + id: macos-arm64-zip format: zip name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" replacements: darwin: Darwin - builds: - - macos-arm64 checksum: name_template: 'checksums.txt' signs: - - ids: + - id: macos-amd64 + ids: - macos-amd64-zip cmd: gon args: - .gon.x86_64.hcl artifacts: all - - ids: + - id: macos-arm64 + ids: - macos-arm64-zip cmd: gon args: From 90dea709bf2a128c4f23832055210a5180a201f6 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 15:20:03 +0200 Subject: [PATCH 52/64] consistent naming --- .goreleaser.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index bae6f2e..f556f44 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -18,7 +18,7 @@ builds: goarch: arm64 main: ./cmd/saturn-l2 binary: saturn-L2-node - - id: macos-amd64 + - id: macos-x86-64 env: - CGO_ENABLED=0 goos: @@ -45,8 +45,8 @@ archives: 386: i386 amd64: x86_64 - builds: - - macos-amd64 - id: macos-amd64-zip + - macos-x86-64 + id: macos-x86-64-zip format: zip name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" replacements: @@ -62,9 +62,9 @@ archives: checksum: name_template: 'checksums.txt' signs: - - id: macos-amd64 + - id: macos-x86-64 ids: - - macos-amd64-zip + - macos-x86-64-zip cmd: gon args: - .gon.x86_64.hcl From f53ca72799b9dea9ec8011645e6a94278d7df2ba Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 15:24:26 +0200 Subject: [PATCH 53/64] fix signing source paths --- .gon.arm64.hcl | 2 +- .gon.x86_64.hcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gon.arm64.hcl b/.gon.arm64.hcl index 001b987..88a872c 100644 --- a/.gon.arm64.hcl +++ b/.gon.arm64.hcl @@ -1,4 +1,4 @@ -source = ["./dist/macos_darwin_arm64/L2-node"] +source = ["./dist/macos-arm64_darwin_arm64/L2-node"] bundle_id = "saturn.filecoin.l2-node" apple_id { diff --git a/.gon.x86_64.hcl b/.gon.x86_64.hcl index 7e46b0f..ba12dc2 100644 --- a/.gon.x86_64.hcl +++ b/.gon.x86_64.hcl @@ -1,4 +1,4 @@ -source = ["./dist/macos_darwin_amd64_v1/L2-node"] +source = ["./dist/macos-amd64_darwin_amd64_v1/L2-node"] bundle_id = "saturn.filecoin.l2-node" apple_id { From 9453b843930a9ec4ae84b5e7adf3416e99dc6820 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 15:39:15 +0200 Subject: [PATCH 54/64] fix source path again --- .gon.x86_64.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gon.x86_64.hcl b/.gon.x86_64.hcl index ba12dc2..34f897e 100644 --- a/.gon.x86_64.hcl +++ b/.gon.x86_64.hcl @@ -1,4 +1,4 @@ -source = ["./dist/macos-amd64_darwin_amd64_v1/L2-node"] +source = ["./dist/macos-x86-64_darwin_amd64_v1/L2-node"] bundle_id = "saturn.filecoin.l2-node" apple_id { From cbadd4174b04ca770a707a28db3915a828d4deab Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 16:05:53 +0200 Subject: [PATCH 55/64] arm signing issues --- .goreleaser.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f556f44..04a94cb 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -69,13 +69,13 @@ signs: args: - .gon.x86_64.hcl artifacts: all - - id: macos-arm64 - ids: - - macos-arm64-zip - cmd: gon - args: - - .gon.arm64.hcl - artifacts: all + # - id: macos-arm64 + # ids: + # - macos-arm64-zip + # cmd: gon + # args: + # - .gon.arm64.hcl + # artifacts: all snapshot: name_template: "{{ incpatch .Version }}-next" changelog: From ecf79b5cc501b86bee304cded72c9289e3326980 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 16:18:55 +0200 Subject: [PATCH 56/64] clean up --- .goreleaser.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 04a94cb..c97d5d3 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -93,9 +93,3 @@ changelog: exclude: - '^docs:' - '^test:' - -release: - ids: - - none - extra_files: - - glob: ./dist/gon_macos.zip \ No newline at end of file From e4a4cd8766ecdc4a841c6778e8c21809feeb0de4 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 21 Sep 2022 17:44:37 +0200 Subject: [PATCH 57/64] always run --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb61c79..6879f20 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,9 +2,6 @@ name: goreleaser on: push: - # run only against tags - # tags: - # - '*' permissions: contents: write From f1a544150843e6bc170acfdd8631f107aa9854c1 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Fri, 23 Sep 2022 09:53:55 +0200 Subject: [PATCH 58/64] try manual arm script --- .gon.arm64.hcl | 15 --------------- .goreleaser.yaml | 12 +++++------- sign-arm.sh | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 22 deletions(-) delete mode 100644 .gon.arm64.hcl create mode 100755 sign-arm.sh diff --git a/.gon.arm64.hcl b/.gon.arm64.hcl deleted file mode 100644 index 88a872c..0000000 --- a/.gon.arm64.hcl +++ /dev/null @@ -1,15 +0,0 @@ -source = ["./dist/macos-arm64_darwin_arm64/L2-node"] -bundle_id = "saturn.filecoin.l2-node" - -apple_id { - username = "oli@protocol.ai" - password = "@env:AC_PASSWORD" -} - -sign { - application_identity = "Developer ID Application: Protocol Labs, Inc." -} - -zip { - output_path="./dist/L2-node_Darwin_arm64.zip" -} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c97d5d3..b74640d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -69,13 +69,11 @@ signs: args: - .gon.x86_64.hcl artifacts: all - # - id: macos-arm64 - # ids: - # - macos-arm64-zip - # cmd: gon - # args: - # - .gon.arm64.hcl - # artifacts: all + - id: macos-arm64 + ids: + - macos-arm64-zip + cmd: sign-arm.sh + artifacts: all snapshot: name_template: "{{ incpatch .Version }}-next" changelog: diff --git a/sign-arm.sh b/sign-arm.sh new file mode 100755 index 0000000..82b73c5 --- /dev/null +++ b/sign-arm.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -e + +codesign --force \ + --timestamp \ + --options runtime \ + --sign "Developer ID Application: Protocol Labs, Inc." dist/macos-x86-64_darwin_amd64_v1/L2-node + +zip -r dist/L2-node_Darwin_x86_64.zip dist/macos-x86-64_darwin_amd64_v1/L2-node + +xcrun altool --notarize-app \ + --primary-bundle-id "saturn.filecoin.l2-node" \ + -u "oli@protocol.ai" \ + -p "${AC_PASSWORD}" \ + -t osx \ + -f dist/L2-node_Darwin_x86_64.zip From 274bd912530e2adbd2fe9b5ea0340be17b059b14 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Fri, 23 Sep 2022 10:01:32 +0200 Subject: [PATCH 59/64] fix path --- .goreleaser.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b74640d..dd98b65 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -72,7 +72,7 @@ signs: - id: macos-arm64 ids: - macos-arm64-zip - cmd: sign-arm.sh + cmd: ./sign-arm.sh artifacts: all snapshot: name_template: "{{ incpatch .Version }}-next" From abf2b9fa4628d6fa1244b50f2d84c1c482c375dc Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Fri, 23 Sep 2022 10:31:35 +0200 Subject: [PATCH 60/64] fix paths --- sign-arm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sign-arm.sh b/sign-arm.sh index 82b73c5..1158cbf 100755 --- a/sign-arm.sh +++ b/sign-arm.sh @@ -4,13 +4,13 @@ set -e codesign --force \ --timestamp \ --options runtime \ - --sign "Developer ID Application: Protocol Labs, Inc." dist/macos-x86-64_darwin_amd64_v1/L2-node + --sign "Developer ID Application: Protocol Labs, Inc." dist/macos-arm64_darwin_arm64/L2-node -zip -r dist/L2-node_Darwin_x86_64.zip dist/macos-x86-64_darwin_amd64_v1/L2-node +zip -r dist/L2-node_Darwin_arm64.zip dist/macos-arm64_darwin_arm64/L2-node xcrun altool --notarize-app \ --primary-bundle-id "saturn.filecoin.l2-node" \ -u "oli@protocol.ai" \ -p "${AC_PASSWORD}" \ -t osx \ - -f dist/L2-node_Darwin_x86_64.zip + -f dist/L2-node_Darwin_arm64.zip From 03e2ee2914b10410661a14b4774239f6e993e69b Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Fri, 23 Sep 2022 11:48:20 +0200 Subject: [PATCH 61/64] wait, why is x86_64 failing now --- .goreleaser.yaml | 4 +--- sign-x86_64.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100755 sign-x86_64.sh diff --git a/.goreleaser.yaml b/.goreleaser.yaml index dd98b65..45306b5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -65,9 +65,7 @@ signs: - id: macos-x86-64 ids: - macos-x86-64-zip - cmd: gon - args: - - .gon.x86_64.hcl + cmd: ./sign-arm.sh artifacts: all - id: macos-arm64 ids: diff --git a/sign-x86_64.sh b/sign-x86_64.sh new file mode 100755 index 0000000..82b73c5 --- /dev/null +++ b/sign-x86_64.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -e + +codesign --force \ + --timestamp \ + --options runtime \ + --sign "Developer ID Application: Protocol Labs, Inc." dist/macos-x86-64_darwin_amd64_v1/L2-node + +zip -r dist/L2-node_Darwin_x86_64.zip dist/macos-x86-64_darwin_amd64_v1/L2-node + +xcrun altool --notarize-app \ + --primary-bundle-id "saturn.filecoin.l2-node" \ + -u "oli@protocol.ai" \ + -p "${AC_PASSWORD}" \ + -t osx \ + -f dist/L2-node_Darwin_x86_64.zip From 37e8ef7d75f02d1e12a07e71992ebd21afba23d1 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 26 Sep 2022 15:23:58 +0200 Subject: [PATCH 62/64] fix sign command --- .goreleaser.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 45306b5..4a5ee31 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -65,7 +65,7 @@ signs: - id: macos-x86-64 ids: - macos-x86-64-zip - cmd: ./sign-arm.sh + cmd: ./sign-x86_64.sh artifacts: all - id: macos-arm64 ids: From 3827fb5aa30118acee67858c9085f9de9b91ea29 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Mon, 26 Sep 2022 17:01:55 +0200 Subject: [PATCH 63/64] switch back to gon, remove arm signing attempts again --- .gon.x86_64.hcl => .gon.hcl | 0 .goreleaser.yaml | 25 +++---------------------- sign-arm.sh | 16 ---------------- sign-x86_64.sh | 16 ---------------- 4 files changed, 3 insertions(+), 54 deletions(-) rename .gon.x86_64.hcl => .gon.hcl (100%) delete mode 100755 sign-arm.sh delete mode 100755 sign-x86_64.sh diff --git a/.gon.x86_64.hcl b/.gon.hcl similarity index 100% rename from .gon.x86_64.hcl rename to .gon.hcl diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4a5ee31..527f186 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -26,15 +26,6 @@ builds: goarch: - amd64 main: ./cmd/saturn-l2 - - id: macos-arm64 - env: - - CGO_ENABLED=0 - goos: - - darwin - goarch: - - arm64 - main: ./cmd/saturn-l2 - archives: - builds: - saturn @@ -52,25 +43,15 @@ archives: replacements: darwin: Darwin amd64: x86_64 - - builds: - - macos-arm64 - id: macos-arm64-zip - format: zip - name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" - replacements: - darwin: Darwin checksum: name_template: 'checksums.txt' signs: - id: macos-x86-64 ids: - macos-x86-64-zip - cmd: ./sign-x86_64.sh - artifacts: all - - id: macos-arm64 - ids: - - macos-arm64-zip - cmd: ./sign-arm.sh + cmd: gon + args: + - .gon.hcl artifacts: all snapshot: name_template: "{{ incpatch .Version }}-next" diff --git a/sign-arm.sh b/sign-arm.sh deleted file mode 100755 index 1158cbf..0000000 --- a/sign-arm.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -set -e - -codesign --force \ - --timestamp \ - --options runtime \ - --sign "Developer ID Application: Protocol Labs, Inc." dist/macos-arm64_darwin_arm64/L2-node - -zip -r dist/L2-node_Darwin_arm64.zip dist/macos-arm64_darwin_arm64/L2-node - -xcrun altool --notarize-app \ - --primary-bundle-id "saturn.filecoin.l2-node" \ - -u "oli@protocol.ai" \ - -p "${AC_PASSWORD}" \ - -t osx \ - -f dist/L2-node_Darwin_arm64.zip diff --git a/sign-x86_64.sh b/sign-x86_64.sh deleted file mode 100755 index 82b73c5..0000000 --- a/sign-x86_64.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -set -e - -codesign --force \ - --timestamp \ - --options runtime \ - --sign "Developer ID Application: Protocol Labs, Inc." dist/macos-x86-64_darwin_amd64_v1/L2-node - -zip -r dist/L2-node_Darwin_x86_64.zip dist/macos-x86-64_darwin_amd64_v1/L2-node - -xcrun altool --notarize-app \ - --primary-bundle-id "saturn.filecoin.l2-node" \ - -u "oli@protocol.ai" \ - -p "${AC_PASSWORD}" \ - -t osx \ - -f dist/L2-node_Darwin_x86_64.zip From abe05e2415dc721e6a201c4f3242255923f37645 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Tue, 27 Sep 2022 10:57:50 +0200 Subject: [PATCH 64/64] Update bundle_id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Miroslav Bajtoš --- .gon.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gon.hcl b/.gon.hcl index 34f897e..e01c76c 100644 --- a/.gon.hcl +++ b/.gon.hcl @@ -1,5 +1,5 @@ source = ["./dist/macos-x86-64_darwin_amd64_v1/L2-node"] -bundle_id = "saturn.filecoin.l2-node" +bundle_id = "io.filecoin.saturn.l2-node" apple_id { username = "oli@protocol.ai"