Skip to content

Commit 9cde87c

Browse files
niikbabakks
andauthored
Apply suggestions from code review
Co-authored-by: Babak K. Shandiz <babakks@github.com>
1 parent c62577b commit 9cde87c

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

.github/workflows/deployment.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ on:
2020
environment:
2121
default: production
2222
type: environment
23-
description: "The deployment environment..."
23+
description: "The deployment environment."
2424
platforms:
2525
default: "linux,macos,windows"
2626
type: string
2727
description: "Comma-separated list of platforms to build."
2828
release:
29-
description: "Whether to create a GitHub Release"
29+
description: "Whether to run the final release job. the dry_run flag still blocks final submissions."
3030
type: boolean
3131
default: true
3232
dry_run:
@@ -113,16 +113,16 @@ jobs:
113113
run: |
114114
# create a keychain for the certificate
115115
PW=pwd.${{ github.run_number }}
116-
security create-keychain -p $PW $RUNNER_TEMP/build.keychain
116+
security create-keychain -p $PW "$RUNNER_TEMP/build.keychain"
117117
security set-keychain-settings -lut 21600 "$RUNNER_TEMP/build.keychain"
118-
security default-keychain -s $RUNNER_TEMP/build.keychain
119-
security unlock-keychain -p $PW $RUNNER_TEMP/build.keychain
118+
security default-keychain -s "$RUNNER_TEMP/build.keychain"
119+
security unlock-keychain -p $PW "$RUNNER_TEMP/build.keychain"
120120
121121
# import the certificate
122-
base64 -d <<<"$DEVELOPER_ID_CERT" > $RUNNER_TEMP/cert.p12
123-
security import $RUNNER_TEMP/cert.p12 -k $RUNNER_TEMP/build.keychain -P "$DEVELOPER_ID_CERT_PASSWORD" -T /usr/bin/codesign
124-
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $PW $RUNNER_TEMP/build.keychain
125-
rm $RUNNER_TEMP/cert.p12
122+
base64 -d <<< "$DEVELOPER_ID_CERT" > "$RUNNER_TEMP/cert.p12"
123+
security import "$RUNNER_TEMP/cert.p12" -k "$RUNNER_TEMP/build.keychain" -P "$DEVELOPER_ID_CERT_PASSWORD" -T /usr/bin/codesign
124+
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $PW "$RUNNER_TEMP/build.keychain"
125+
rm "$RUNNER_TEMP/cert.p12"
126126
127127
- name: Add App Store Connect API key to keychain
128128
if: inputs.environment == 'production'
@@ -142,7 +142,7 @@ jobs:
142142
--key "${{ steps.setup-apple-codesign.outputs.app-store-connect-api-key-key-path }}" \
143143
--key-id "${{ steps.setup-apple-codesign.outputs.app-store-connect-api-key-key-id }}" \
144144
--issuer "${{ steps.setup-apple-codesign.outputs.app-store-connect-api-key-issuer-id }}" \
145-
--keychain $RUNNER_TEMP/build.keychain
145+
--keychain "$RUNNER_TEMP/build.keychain"
146146
147147
- name: Install GoReleaser
148148
uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
@@ -394,27 +394,22 @@ jobs:
394394
create-storage-record: false # (default: true)
395395
- name: Run createrepo
396396
if: ${{ inputs.environment == 'production' }}
397-
env:
398-
GPG_SIGN: ${{ inputs.environment == 'production' }}
399397
run: |
400398
mkdir -p site/packages/rpm
401399
cp dist/*.rpm site/packages/rpm/
402400
./script/createrepo.sh
403401
cp -r dist/repodata site/packages/rpm/
404402
pushd site/packages/rpm
405-
[ "$GPG_SIGN" = "false" ] || gpg --yes --detach-sign --armor repodata/repomd.xml
403+
gpg --yes --detach-sign --armor repodata/repomd.xml
406404
popd
407405
- name: Run reprepro
408406
if: ${{ inputs.environment == 'production' }}
409-
env:
410-
GPG_SIGN: ${{ inputs.environment == 'production' }}
411407
# We are no longer adding to the distribution list.
412408
# All apt distributions should use "stable" according to our install documentation.
413409
# In the future we will remove legacy distributions listed here.
414410
RELEASES: "cosmic eoan disco groovy focal stable oldstable testing sid unstable buster bullseye stretch jessie bionic trusty precise xenial hirsute impish kali-rolling"
415411
run: |
416412
mkdir -p upload
417-
[ "$GPG_SIGN" = "true" ] || sed -i.bak '/^SignWith:/d' script/distributions
418413
for release in $RELEASES; do
419414
for file in dist/*.deb; do
420415
reprepro --confdir="+b/script" includedeb "$release" "$file"

0 commit comments

Comments
 (0)