Skip to content

Commit a5a05f2

Browse files
committed
cleanup pre-release script
1 parent a258cc7 commit a5a05f2

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

.github/workflows/pre-release.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
steps:
1212
- name: Checkout repository
1313
uses: actions/checkout@v2
14+
15+
############################
16+
# Install Certificate
17+
############################
1418
- name: Install codesign certificate
1519
env:
1620
# DEV_CERT_B64: Base64-encoded developer certificate as .p12
@@ -37,18 +41,30 @@ jobs:
3741
echo -n "$MAC_CERT_B64" | base64 --decode --output "$MAC_CERT_P12"
3842
security import "$MAC_CERT_P12" -P "$MAC_CERT_PWD" -A -t cert -f pkcs12 -k "$KEYCHAIN_DB"
3943
security list-keychain -d user -s "$KEYCHAIN_DB"
44+
45+
############################
46+
# Build
47+
############################
4048
- name: Build CodeEdit
4149
env:
4250
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
4351
run: xcodebuild -scheme CodeEdit -configuration Release -derivedDataPath "$RUNNER_TEMP/DerivedData" -archivePath "$RUNNER_TEMP/CodeEdit.xcarchive" -skipPackagePluginValidation DEVELOPMENT_TEAM=$APPLE_TEAM_ID archive
52+
53+
############################
54+
# Sign
55+
############################
4456
- name: Sign CodeEdit
4557
env:
4658
CODESIGN_SIGN: ${{ secrets.CODESIGN_SIGN }}
4759
run: |
4860
REV=$(git rev-parse --short HEAD)
4961
echo "REV=$REV" >> $GITHUB_ENV
5062
codesign --sign "$CODESIGN_SIGN" -vvv --verbose --strict --options=runtime --prefix austincondiff.CodeEdit. --force --deep --timestamp "$RUNNER_TEMP/CodeEdit.xcarchive/Products/Applications/CodeEdit.app"
51-
- name: Using brew
63+
64+
############################
65+
# DMG & Notarize
66+
############################
67+
- name: Create DMG & Notarize
5268
env:
5369
CODESIGN_SIGN: ${{ secrets.CODESIGN_SIGN }}
5470
APPLE_ID: ${{ secrets.APPLE_ID }}
@@ -71,6 +87,10 @@ jobs:
7187
--notarize "CodeEdit" \
7288
"$RUNNER_TEMP/CodeEdit-$REV.dmg" \
7389
"$RUNNER_TEMP/CodeEdit.xcarchive/Products/Applications/"
90+
91+
############################
92+
# Sparkle Appcast
93+
############################
7494
- name: Update Sparkle appcast
7595
env:
7696
# SPARKLE_KEY: Sparkle EdDSA key exported from `generate_keys -x` as plain text
@@ -89,8 +109,10 @@ jobs:
89109
cp "$RUNNER_TEMP/CodeEdit-$REV.dmg" "$SPARKLE_ARCHIVE"
90110
SPARKLE_SIG=$("$SPARKLE_BIN/sign_update" --ed-key-file "$RUNNER_TEMP/sparkle_key" "$SPARKLE_ARCHIVE/CodeEdit-$REV.dmg" | cut -d\" -f2)
91111
"$SPARKLE_BIN/generate_appcast" --ed-key-file "$RUNNER_TEMP/sparkle_key" --download-url-prefix "$SPARKLE_DL_PREFIX" --link "$SPARKLE_LINK" --channel "$SPARKLE_CHANNEL" --maximum-deltas 0 "$SPARKLE_ARCHIVE"
92-
# brew install xmlstarlet
93-
# xmlstarlet ed -O --inplace --insert "/rss/channel/item/enclosure" --type attr -n "sparkle:edSignature" -v "$SPARKLE_SIG" "$SPARKLE_ARCHIVE/appcast.xml"
112+
113+
############################
114+
# Publish Pre Release
115+
############################
94116
- name: Publish Pre-release
95117
uses: marvinpinto/action-automatic-releases@latest
96118
with:
@@ -101,6 +123,10 @@ jobs:
101123
automatic_release_tag: "latest"
102124
prerelease: true
103125
repo_token: "${{ secrets.GITHUB_TOKEN }}"
126+
127+
############################
128+
# Cleanup Secrets
129+
############################
104130
- name: Clean up keychain and provisioning profile
105131
if: ${{ always() }}
106132
run: |

0 commit comments

Comments
 (0)