Skip to content

Commit

Permalink
Merge pull request #568 from kiwix/appstore-release-only
Browse files Browse the repository at this point in the history
only upload to Apple upon releases
  • Loading branch information
rgaudin authored Nov 28, 2023
2 parents 109d8d4 + 090d9f6 commit d28874b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ jobs:
version = str(datetime.date.today())
upload_folder = f"nightly/{version}"
export_method = "developer-id" if os.getenv("UPLOAD_TO") == "dmg" else "app-store"
upload_to = os.getenv("UPLOAD_TO")
export_method = "developer-id" if upload_to == "dmg" else "app-store"
upload_to_apple = True
if not is_release and upload_to == "app-store":
upload_to_apple = False
extra_xcode = os.getenv("EXTRA_XCODEBUILD", "")
if os.getenv("PLATFORM") == "iOS":
Expand All @@ -70,6 +74,7 @@ jobs:
fh.write(f"EXPORT_METHOD={export_method}\n")
fh.write(f"UPLOAD_FOLDER={upload_folder}\n")
fh.write(f"EXTRA_XCODEBUILD={extra_xcode}\n")
fh.write(f"UPLOAD_TO_APPLE={'yes' if upload_to_apple else ''}\n")
- name: Prepare use of Developper ID Certificate
if: ${{ matrix.destination.uploadto == 'dmg' }}
Expand Down Expand Up @@ -164,6 +169,7 @@ jobs:
plutil -replace provisioningProfiles -json '{ "self.Kiwix" : "iOS Team Provisioning Profile" }' ./export.plist
- name: Upload Archive to Apple (App Store or Notarization)
if: ${{ env.UPLOAD_TO_APPLE }}
env:
APPLE_STORE_AUTH_KEY_PATH: ${{ env.APPLE_STORE_AUTH_KEY_PATH }}
APPLE_STORE_AUTH_KEY_ID: ${{ secrets.APPLE_STORE_AUTH_KEY_ID }}
Expand Down Expand Up @@ -191,6 +197,7 @@ jobs:
xcrun stapler staple $PWD/kiwix-$VERSION.dmg
- name: Add SSH_KEY to filesystem
if: ${{ matrix.destination.uploadto == 'dmg' || matrix.destination.uploadto == 'ipa' }}
shell: bash
env:
PRIVATE_KEY: ${{ secrets.SSH_KEY }}
Expand Down

0 comments on commit d28874b

Please sign in to comment.