Skip to content

Commit fb104e3

Browse files
committed
Add blank lines to visually group shell command lines
The `run` keys of the steps in the GitHub Actions workflows contain complex shell command lines. The readability of this code is improved by selectively adding blank lines to separate it visually into logical groupings.
1 parent 9d7b45a commit fb104e3

File tree

7 files changed

+33
-0
lines changed

7 files changed

+33
-0
lines changed

.github/workflows/check-general-formatting-task.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,16 @@ jobs:
7171
- name: Install editorconfig-checker
7272
run: |
7373
cd "${{ env.EC_INSTALL_PATH }}"
74+
7475
tar \
7576
--extract \
7677
--file="${{ steps.download.outputs.name }}"
78+
7779
# Give the binary a standard name
7880
mv \
7981
"${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" \
8082
"${{ env.EC_INSTALL_PATH }}/bin/ec"
83+
8184
# Add installation to PATH:
8285
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
8386
echo "${{ env.EC_INSTALL_PATH }}/bin" >>"$GITHUB_PATH"

.github/workflows/check-shell-task.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,17 @@ jobs:
105105
- name: Install ShellCheck
106106
run: |
107107
cd "${{ env.INSTALL_PATH }}"
108+
108109
tar \
109110
--extract \
110111
--file="${{ steps.download.outputs.name }}"
112+
111113
EXTRACTION_FOLDER="$(
112114
basename \
113115
"${{ steps.download.outputs.name }}" \
114116
"${{ env.SHELLCHECK_RELEASE_ASSET_SUFFIX }}"
115117
)"
118+
116119
# Add installation to PATH:
117120
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
118121
echo "${{ env.INSTALL_PATH }}/$EXTRACTION_FOLDER" >>"$GITHUB_PATH"
@@ -172,10 +175,12 @@ jobs:
172175
chmod \
173176
+x \
174177
"${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}"
178+
175179
# Standardize binary name
176180
mv \
177181
"${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}" \
178182
"${{ env.SHFMT_INSTALL_PATH }}/shfmt"
183+
179184
# Add installation to PATH:
180185
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
181186
echo "${{ env.SHFMT_INSTALL_PATH }}" >>"$GITHUB_PATH"

.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,18 @@ jobs:
105105
git config \
106106
--global \
107107
user.email "bot@arduino.cc"
108+
108109
git config \
109110
--global \
110111
user.name "ArduinoBot"
112+
111113
git fetch \
112114
--no-tags \
113115
--prune \
114116
--depth=1 \
115117
origin \
116118
+refs/heads/gh-pages:refs/remotes/origin/gh-pages
119+
117120
poetry run \
118121
mike deploy \
119122
--update-aliases \

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,22 @@ jobs:
115115
security create-keychain \
116116
-p "${{ env.KEYCHAIN_PASSWORD }}" \
117117
"${{ env.KEYCHAIN }}"
118+
118119
security default-keychain \
119120
-s "${{ env.KEYCHAIN }}"
121+
120122
security unlock-keychain \
121123
-p "${{ env.KEYCHAIN_PASSWORD }}" \
122124
"${{ env.KEYCHAIN }}"
125+
123126
security import \
124127
"${{ env.INSTALLER_CERT_MAC_PATH }}" \
125128
-k "${{ env.KEYCHAIN }}" \
126129
-f pkcs12 \
127130
-A \
128131
-T /usr/bin/codesign \
129132
-P "${{ secrets.INSTALLER_CERT_MAC_PASSWORD }}"
133+
130134
security set-key-partition-list \
131135
-S apple-tool:,apple: \
132136
-s \
@@ -142,6 +146,7 @@ jobs:
142146
unzip \
143147
gon_macos.zip \
144148
-d /usr/local/bin
149+
145150
- name: Write gon config to file
146151
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
147152
run: |
@@ -179,14 +184,17 @@ jobs:
179184
chmod \
180185
+x \
181186
"${{ env.BUILD_FOLDER }}/${{ env.PROJECT_NAME }}"
187+
182188
# Use of an array here is required for globbing
183189
PACKAGE_FILENAME=(${{ env.PROJECT_NAME }}_nightly-*${{ matrix.build.package-suffix }})
190+
184191
tar \
185192
-czvf "$PACKAGE_FILENAME" \
186193
-C "${{ env.BUILD_FOLDER }}/" \
187194
"${{ env.PROJECT_NAME }}" \
188195
-C ../../ \
189196
LICENSE.txt
197+
190198
echo "PACKAGE_FILENAME=$PACKAGE_FILENAME" >> $GITHUB_ENV
191199
192200
- name: Replace artifact with notarized build

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,11 @@ jobs:
151151
- name: Create checksum file
152152
run: |
153153
TAG="${{ needs.package-name-prefix.outputs.prefix }}git-snapshot"
154+
154155
declare \
155156
-a \
156157
artifacts=($(ls -d */))
158+
157159
for artifact in ${artifacts[@]}; do
158160
cd $artifact
159161
checksum=$(sha256sum ${{ env.PROJECT_NAME }}_${TAG}*)

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
run: |
102102
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
103103
echo "BUILD_FOLDER=${{ env.PROJECT_NAME }}_osx_${{ matrix.build.folder-suffix }}" >>"$GITHUB_ENV"
104+
104105
TAG="${GITHUB_REF/refs\/tags\//}"
105106
echo "PACKAGE_FILENAME=${{ env.PROJECT_NAME }}_${TAG}_${{ matrix.build.package-suffix }}" >>$GITHUB_ENV
106107
@@ -121,21 +122,26 @@ jobs:
121122
KEYCHAIN_PASSWORD: keychainpassword
122123
run: |
123124
echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode >"${{ env.INSTALLER_CERT_MAC_PATH }}"
125+
124126
security create-keychain \
125127
-p "${{ env.KEYCHAIN_PASSWORD }}" \
126128
"${{ env.KEYCHAIN }}"
129+
127130
security default-keychain \
128131
-s "${{ env.KEYCHAIN }}"
132+
129133
security unlock-keychain \
130134
-p "${{ env.KEYCHAIN_PASSWORD }}" \
131135
"${{ env.KEYCHAIN }}"
136+
132137
security import \
133138
"${{ env.INSTALLER_CERT_MAC_PATH }}" \
134139
-k "${{ env.KEYCHAIN }}" \
135140
-f pkcs12 \
136141
-A \
137142
-T "/usr/bin/codesign" \
138143
-P "${{ secrets.INSTALLER_CERT_MAC_PASSWORD }}"
144+
139145
security set-key-partition-list \
140146
-S apple-tool:,apple: \
141147
-s \
@@ -150,6 +156,7 @@ jobs:
150156
unzip \
151157
gon_macos.zip \
152158
-d /usr/local/bin
159+
153160
- name: Write gon config to file
154161
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
155162
run: |
@@ -192,6 +199,7 @@ jobs:
192199
-C "${{ env.BUILD_FOLDER }}/" \
193200
"${{ env.PROJECT_NAME }}" \
194201
-C ../../ LICENSE.txt
202+
195203
- name: Replace artifact with notarized build
196204
uses: actions/upload-artifact@v4
197205
with:
@@ -231,14 +239,17 @@ jobs:
231239
-q \
232240
-P /tmp \
233241
https://github.com/fsaintjacques/semver-tool/archive/3.2.0.zip
242+
234243
unzip \
235244
-p \
236245
/tmp/3.2.0.zip \
237246
semver-tool-3.2.0/src/semver \
238247
>/tmp/semver
248+
239249
chmod \
240250
+x \
241251
/tmp/semver
252+
242253
if [[ \
243254
"$(
244255
/tmp/semver get prerel \

.github/workflows/test-install.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
mkdir \
7878
-p \
7979
"${{ env.BINDIR }}"
80+
8081
"${{ github.workspace }}/etc/install.sh"
8182
8283
- name: Verify installation

0 commit comments

Comments
 (0)