Skip to content

Commit d03530c

Browse files
committed
Fixed mac notarize
1 parent a697df6 commit d03530c

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

.github/workflows/release-go-task.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
run: |
100100
gon gon.config.hcl
101101
102-
- name: Re-package binary and update checksum
102+
- name: Re-package amd64 binary and update checksum
103103
# This step performs the following:
104104
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
105105
# 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file
@@ -118,6 +118,25 @@ jobs:
118118
-e "s/.*${{ env.PROJECT_NAME }}_${TAG}_macOS_64bit.tar.gz/${CHECKSUM} ${{ env.PROJECT_NAME }}_${TAG}_macOS_64bit.tar.gz/g;" \
119119
${{ env.DIST_DIR }}/*-checksums.txt
120120
121+
- name: Re-package ARM64 binary and update checksum
122+
# This step performs the following:
123+
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
124+
# 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file
125+
run: |
126+
# GitHub's upload/download-artifact@v4 actions don't preserve file permissions,
127+
# so we need to add execution permission back until the action is made to do this.
128+
chmod +x ${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_osx_darwin_arm64/${{ env.PROJECT_NAME }}
129+
TAG="${GITHUB_REF/refs\/tags\//}"
130+
tar -czvf "${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_${TAG}_macOS_ARM64.tar.gz" \
131+
-C ${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_osx_darwin_arm64/ ${{ env.PROJECT_NAME }} \
132+
-C ../../ LICENSE.txt
133+
CHECKSUM="$(shasum -a 256 ${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_${TAG}_macOS_ARM64.tar.gz | cut -d " " -f 1)"
134+
perl \
135+
-pi \
136+
-w \
137+
-e "s/.*${{ env.PROJECT_NAME }}_${TAG}_macOS_ARM64.tar.gz/${CHECKSUM} ${{ env.PROJECT_NAME }}_${TAG}_macOS_ARM64.tar.gz/g;" \
138+
${{ env.DIST_DIR }}/*-checksums.txt
139+
121140
- name: Upload artifacts
122141
uses: actions/upload-artifact@v4
123142
with:
@@ -156,14 +175,3 @@ jobs:
156175
# NOTE: "Artifact is a directory" warnings are expected and don't indicate a problem
157176
# (all the files we need are in the DIST_DIR root)
158177
artifacts: ${{ env.DIST_DIR }}/*
159-
160-
# TODO
161-
# - name: Upload release files on Arduino downloads servers
162-
# uses: docker://plugins/s3
163-
# env:
164-
# PLUGIN_SOURCE: "${{ env.DIST_DIR }}/*"
165-
# PLUGIN_TARGET: ${{ env.AWS_PLUGIN_TARGET }}
166-
# PLUGIN_STRIP_PREFIX: "${{ env.DIST_DIR }}/"
167-
# PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
168-
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
169-
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

gon.config.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/general/gon.config.hcl
22
# See: https://github.com/Bearer/gon#configuration-file
3-
source = ["dist/arduino-cloud-cli_osx_darwin_amd64/arduino-cloud-cli"]
3+
source = ["dist/arduino-cloud-cli_osx_darwin_amd64/arduino-cloud-cli", "dist/arduino-cloud-cli_osx_darwin_arm64/arduino-cloud-cli"]
44
bundle_id = "cc.arduino.arduino-cloud-cli"
55

66
sign {

0 commit comments

Comments
 (0)