Skip to content

Commit c39b240

Browse files
umbynosper1234
andauthored
Apply suggestions from code review
Co-authored-by: per1234 <[email protected]>
1 parent 74889c3 commit c39b240

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

.github/workflows/publish-go-nightly-task.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@ jobs:
4545
path: ${{ env.DIST_DIR }}
4646

4747
notarize-macos:
48-
name: notarize-${{ matrix.artifact.name }}
48+
name: Notarize ${{ matrix.artifact.name }}
4949
runs-on: macos-latest
5050
needs: create-nightly-artifacts
5151
outputs:
5252
checksum-darwin_amd64: ${{ steps.re-package.outputs.checksum-darwin_amd64 }}
5353
checksum-darwin_arm64: ${{ steps.re-package.outputs.checksum-darwin_arm64 }}
5454

55+
env:
56+
GON_CONFIG_PATH: gon.config.hcl
57+
5558
strategy:
5659
matrix:
5760
artifact:
@@ -101,7 +104,7 @@ jobs:
101104
- name: Write gon config to file
102105
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
103106
run: |
104-
cat > gon.config.hcl <<EOF
107+
cat > "${{ env.GON_CONFIG_PATH }}" <<EOF
105108
# See: https://github.com/mitchellh/gon#configuration-file
106109
source = ["dist/arduino-cli_osx_${{ matrix.artifact.name }}/arduino-cli"]
107110
bundle_id = "cc.arduino.arduino-cli"
@@ -122,15 +125,16 @@ jobs:
122125
AC_USERNAME: ${{ secrets.AC_USERNAME }}
123126
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
124127
run: |
125-
gon gon.config.hcl
128+
gon "${{ env.GON_CONFIG_PATH }}"
126129
127130
- name: Re-package binary and output checksum
128131
id: re-package
129132
working-directory: ${{ env.DIST_DIR }}
130133
# This step performs the following:
131134
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
132135
# 2. Recalculate package checksum
133-
# 3. Output the new checksum to include in the nnnnnn-checksums.txt file(it cannot be done there because of parallelization)
136+
# 3. Output the new checksum to include in the nnnnnn-checksums.txt file
137+
# (it cannot be done there because of workflow job parallelization)
134138
run: |
135139
# GitHub's upload/download-artifact@v2 actions don't preserve file permissions,
136140
# so we need to add execution permission back until the action is made to do this.

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,16 @@ jobs:
5050
path: ${{ env.DIST_DIR }}
5151

5252
notarize-macos:
53-
name: notarize-${{ matrix.artifact.name }}
53+
name: Notarize ${{ matrix.artifact.name }}
5454
runs-on: macos-latest
5555
needs: create-release-artifacts
5656
outputs:
5757
checksum-darwin_amd64: ${{ steps.re-package.outputs.checksum-darwin_amd64 }}
5858
checksum-darwin_arm64: ${{ steps.re-package.outputs.checksum-darwin_arm64 }}
5959

60+
env:
61+
GON_CONFIG_PATH: gon.config.hcl
62+
6063
strategy:
6164
matrix:
6265
artifact:
@@ -106,7 +109,7 @@ jobs:
106109
- name: Write gon config to file
107110
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
108111
run: |
109-
cat > gon.config.hcl <<EOF
112+
cat > "${{ env.GON_CONFIG_PATH }}" <<EOF
110113
# See: https://github.com/mitchellh/gon#configuration-file
111114
source = ["dist/arduino-cli_osx_${{ matrix.artifact.name }}/arduino-cli"]
112115
bundle_id = "cc.arduino.arduino-cli"
@@ -127,15 +130,16 @@ jobs:
127130
AC_USERNAME: ${{ secrets.AC_USERNAME }}
128131
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
129132
run: |
130-
gon gon.config.hcl
133+
gon "${{ env.GON_CONFIG_PATH }}"
131134
132135
- name: Re-package binary and output checksum
133136
id: re-package
134137
working-directory: ${{ env.DIST_DIR }}
135138
# This step performs the following:
136139
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
137140
# 2. Recalculate package checksum
138-
# 3. Output the new checksum to include in the nnnnnn-checksums.txt file(it cannot be done there because of parallelization)
141+
# 3. Output the new checksum to include in the nnnnnn-checksums.txt file
142+
# (it cannot be done there because of workflow job parallelization)
139143
run: |
140144
# GitHub's upload/download-artifact@v2 actions don't preserve file permissions,
141145
# so we need to add execution permission back until the action is made to do this.

0 commit comments

Comments
 (0)