diff --git a/.github/workflows/release-go-task.yml b/.github/workflows/release-go-task.yml index 57c1e886..05c92d3c 100644 --- a/.github/workflows/release-go-task.yml +++ b/.github/workflows/release-go-task.yml @@ -99,7 +99,7 @@ jobs: run: | gon gon.config.hcl - - name: Re-package binary and update checksum + - name: Re-package amd64 binary and update checksum # This step performs the following: # 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file) # 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file @@ -118,6 +118,25 @@ jobs: -e "s/.*${{ env.PROJECT_NAME }}_${TAG}_macOS_64bit.tar.gz/${CHECKSUM} ${{ env.PROJECT_NAME }}_${TAG}_macOS_64bit.tar.gz/g;" \ ${{ env.DIST_DIR }}/*-checksums.txt + - name: Re-package ARM64 binary and update checksum + # This step performs the following: + # 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file) + # 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file + run: | + # GitHub's upload/download-artifact@v4 actions don't preserve file permissions, + # so we need to add execution permission back until the action is made to do this. + chmod +x ${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_osx_darwin_arm64/${{ env.PROJECT_NAME }} + TAG="${GITHUB_REF/refs\/tags\//}" + tar -czvf "${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_${TAG}_macOS_ARM64.tar.gz" \ + -C ${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_osx_darwin_arm64/ ${{ env.PROJECT_NAME }} \ + -C ../../ LICENSE.txt + CHECKSUM="$(shasum -a 256 ${{ env.DIST_DIR }}/${{ env.PROJECT_NAME }}_${TAG}_macOS_ARM64.tar.gz | cut -d " " -f 1)" + perl \ + -pi \ + -w \ + -e "s/.*${{ env.PROJECT_NAME }}_${TAG}_macOS_ARM64.tar.gz/${CHECKSUM} ${{ env.PROJECT_NAME }}_${TAG}_macOS_ARM64.tar.gz/g;" \ + ${{ env.DIST_DIR }}/*-checksums.txt + - name: Upload artifacts uses: actions/upload-artifact@v4 with: @@ -156,14 +175,3 @@ jobs: # NOTE: "Artifact is a directory" warnings are expected and don't indicate a problem # (all the files we need are in the DIST_DIR root) artifacts: ${{ env.DIST_DIR }}/* - - # TODO - # - name: Upload release files on Arduino downloads servers - # uses: docker://plugins/s3 - # env: - # PLUGIN_SOURCE: "${{ env.DIST_DIR }}/*" - # PLUGIN_TARGET: ${{ env.AWS_PLUGIN_TARGET }} - # PLUGIN_STRIP_PREFIX: "${{ env.DIST_DIR }}/" - # PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }} - # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/DistTasks.yml b/DistTasks.yml index b7623381..eccd14ab 100644 --- a/DistTasks.yml +++ b/DistTasks.yml @@ -35,6 +35,7 @@ tasks: - task: Linux_ARMv7 - task: Linux_ARM64 - task: macOS_64bit + - task: macOS_ARM64 Windows_32bit: desc: Builds Windows 32 bit binaries @@ -168,7 +169,7 @@ tasks: vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_6" - BUILD_COMMAND: "go build -o {{.DIST_DIR}}/{{.PLATFORM_DIR}}/{{.PROJECT_NAME}} {{.LDFLAGS}}" + BUILD_COMMAND: "go build -o {{.DIST_DIR}}/{{.PLATFORM_DIR}}/{{.PROJECT_NAME}} {{.LDFLAGS}} -buildvcs=false" BUILD_PLATFORM: "linux/armv6" CONTAINER_TAG: "{{.GO_VERSION}}-armel-debian12" PACKAGE_PLATFORM: "Linux_ARMv6" @@ -197,7 +198,7 @@ tasks: PACKAGE_NAME: "{{.PROJECT_NAME}}_{{.VERSION}}_{{.PACKAGE_PLATFORM}}.tar.gz" macOS_64bit: - desc: Builds Mac OS X 64 bit binaries + desc: Builds Mac OS X x86_64 bit binaries dir: "{{.DIST_DIR}}" cmds: - | @@ -212,7 +213,7 @@ tasks: vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_osx_darwin_amd64" - BUILD_COMMAND: "go build -o {{.DIST_DIR}}/{{.PLATFORM_DIR}}/{{.PROJECT_NAME}} {{.LDFLAGS}}" + BUILD_COMMAND: "go build -o {{.DIST_DIR}}/{{.PLATFORM_DIR}}/{{.PROJECT_NAME}} {{.LDFLAGS}} -buildvcs=false" BUILD_PLATFORM: "darwin/amd64" # We are experiencing the following error with macOS_64bit build: # @@ -227,6 +228,28 @@ tasks: # # To compile it we need an SDK >=10.12 so we use the debian10 based container that # has the SDK 10.14 installed. - CONTAINER_TAG: "{{.GO_VERSION}}-darwin" + CONTAINER_TAG: "{{.GO_VERSION}}-darwin-debian10" PACKAGE_PLATFORM: "macOS_64bit" PACKAGE_NAME: "{{.PROJECT_NAME}}_{{.VERSION}}_{{.PACKAGE_PLATFORM}}.tar.gz" + + macOS_ARM64: + desc: Builds Mac OS X ARM64 binaries + dir: "{{.DIST_DIR}}" + cmds: + - | + docker run -v `pwd`/..:/home/build -w /home/build \ + -e CGO_ENABLED=1 \ + {{.CONTAINER}}:{{.CONTAINER_TAG}} \ + --build-cmd "{{.BUILD_COMMAND}}" \ + -p "{{.BUILD_PLATFORM}}" + + tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}} + sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} + + vars: + PLATFORM_DIR: "{{.PROJECT_NAME}}_osx_darwin_arm64" + BUILD_COMMAND: "go build -o {{.DIST_DIR}}/{{.PLATFORM_DIR}}/{{.PROJECT_NAME}} {{.LDFLAGS}} -buildvcs=false" + BUILD_PLATFORM: "darwin/arm64" + CONTAINER_TAG: "{{.GO_VERSION}}-darwin-arm64-debian10" + PACKAGE_PLATFORM: "macOS_ARM64" + PACKAGE_NAME: "{{.PROJECT_NAME}}_{{.VERSION}}_{{.PACKAGE_PLATFORM}}.tar.gz" diff --git a/gon.config.hcl b/gon.config.hcl index f32ba1ed..4a4eefdf 100644 --- a/gon.config.hcl +++ b/gon.config.hcl @@ -1,6 +1,6 @@ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/general/gon.config.hcl # See: https://github.com/Bearer/gon#configuration-file -source = ["dist/arduino-cloud-cli_osx_darwin_amd64/arduino-cloud-cli"] +source = ["dist/arduino-cloud-cli_osx_darwin_amd64/arduino-cloud-cli", "dist/arduino-cloud-cli_osx_darwin_arm64/arduino-cloud-cli"] bundle_id = "cc.arduino.arduino-cloud-cli" sign { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy