99
99
run : |
100
100
gon gon.config.hcl
101
101
102
- - name : Re-package binary and update checksum
102
+ - name : Re-package amd64 binary and update checksum
103
103
# This step performs the following:
104
104
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
105
105
# 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file
@@ -118,6 +118,25 @@ jobs:
118
118
-e "s/.*${{ env.PROJECT_NAME }}_${TAG}_macOS_64bit.tar.gz/${CHECKSUM} ${{ env.PROJECT_NAME }}_${TAG}_macOS_64bit.tar.gz/g;" \
119
119
${{ env.DIST_DIR }}/*-checksums.txt
120
120
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
+
121
140
- name : Upload artifacts
122
141
uses : actions/upload-artifact@v4
123
142
with :
@@ -156,14 +175,3 @@ jobs:
156
175
# NOTE: "Artifact is a directory" warnings are expected and don't indicate a problem
157
176
# (all the files we need are in the DIST_DIR root)
158
177
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 }}
0 commit comments