Skip to content

Commit

Permalink
Use slowlane to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
hguandl committed Apr 10, 2023
1 parent a692611 commit dc26e21
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ xcuserdata/
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
update/
build/
DerivedData/
*.moved-aside
Expand Down Expand Up @@ -95,4 +96,4 @@ fastlane/test_output
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
xcuserdata/*
xcuserdata/*
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "hguandl/PlayTools" "6eb977bff2ab6dae9ba14688dbb99a9708acc6f0"
github "hguandl/PlayTools" "3450271e165cc11258ad467e57fce12ae1d25289"
29 changes: 27 additions & 2 deletions release.sh → slowlane.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ set -eu -o pipefail

rm -rf build

### Build PlayCover

xcodebuild clean archive -scheme PlayCover -configuration Release -archivePath build/PlayCover.xcarchive

APP_BUNDLE="build/PlayCover.xcarchive/Products/Applications/PlayCover.app"
Expand All @@ -11,12 +13,35 @@ codesign -s "Developer ID Application: Hao Guan (29V29Y67P2)" -f -o runtime --de
codesign -s "Developer ID Application: Hao Guan (29V29Y67P2)" -f -o runtime --deep --timestamp $APP_BUNDLE/Contents/Frameworks/Sparkle.framework
codesign -s "Developer ID Application: Hao Guan (29V29Y67P2)" -f -o runtime --deep --timestamp $APP_BUNDLE

### Package PlayCover

mkdir -p build/PlayCover
ln -sfh /Applications build/PlayCover/Applications
mv $APP_BUNDLE build/PlayCover
hdiutil create -srcfolder build/PlayCover -format UDBZ build/PlayCover.dmg

### Notarize PlayCover

xcrun notarytool submit build/PlayCover.dmg --keychain-profile "HG_NOTARY_PWD" --wait
xcrun stapler staple build/PlayCover.dmg
mv build/PlayCover.dmg build/PlayCover-$(date -u +"%Y%m%dT%H%M%SZ").dmg
open build

### Upload PlayCover

rm -rf update/updates
mkdir -p update/updates

TAG_NAME=$(git describe --tags --abbrev=0)
mv build/PlayCover.dmg update/updates/PlayCover-$TAG_NAME.dmg
gh release create $TAG_NAME update/updates/PlayCover-$TAG_NAME.dmg --title "$TAG_NAME" --generate-notes

### Publish PlayCover

cd update
./sparkle/bin/generate_appcast \
--download-url-prefix 'https://github.com/PlayCover/PlayCover/releases/download/$TAG_NAME/' \
--link 'https://github.com/PlayCover/PlayCover/releases/tag/$TAG_NAME' \
--full-release-notes-url 'https://github.com/PlayCover/PlayCover/releases/tag/$TAG_NAME' \
-o appcast.xml ./updates
git add appcast.xml
git commit -S -m "Update appcast.xml"
git push origin update

0 comments on commit dc26e21

Please sign in to comment.