Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/scripts/archive_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -eo pipefail

xcodebuild -workspace Decred\ Wallet.xcworkspace \
-scheme Decred\ Wallet\ Testnet \
-sdk iphoneos \
-configuration Testnet\ Release \
-archivePath $PWD/build/Decred\ Wallet.xcarchive \
-allowProvisioningUpdates \
CODE_SIGN_IDENTITY="iPhone Distribution" \
PROVISIONING_PROFILE="b6b99236-cee8-4bab-abc8-1735c701853a" \
CODE_SIGN_STYLE="Manual" \
DEVELOPMENT_TEAM="UX9L95U548" \
clean archive | xcpretty
9 changes: 9 additions & 0 deletions .github/scripts/export_ipa.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -eo pipefail

xcodebuild -archivePath $PWD/build/Decred\ Wallet.xcarchive \
-exportOptionsPlist Decred\ Wallet/exportOptions.plist \
-exportPath $PWD/build \
-allowProvisioningUpdates \
-exportArchive | xcpretty
5 changes: 5 additions & 0 deletions .github/scripts/publish_testflight.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -eo pipefail

xcrun altool --upload-app -t ios -f build/Decred\ Wallet\ Testnet.ipa -u "$APPLEID_USERNAME" -p "$APPLEID_PASSWORD" --verbose
Binary file not shown.
Binary file added .github/secrets/dcriostestnet.mobileprovision.gpg
Binary file not shown.
20 changes: 20 additions & 0 deletions .github/secrets/decrypt_secrets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
set -eo pipefail

gpg --quiet --batch --yes --decrypt --passphrase="$IOS_KEYS" --output ./.github/secrets/dcriostestnet.mobileprovision.mobileprovision ./.github/secrets/dcriostestnet.mobileprovision.gpg
gpg --quiet --batch --yes --decrypt --passphrase="$IOS_KEYS" --output ./.github/secrets/DistributeCertificatesRaedah.p12 ./.github/secrets/DistributeCertificatesRaedah.p12.gpg

mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles

cp ./.github/secrets/dcriostestnet.mobileprovision.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/dcriostestnet.mobileprovision.mobileprovision


security create-keychain -p "" build.keychain
security import ./.github/secrets/DistributeCertificatesRaedah.p12 -t agg -k ~/Library/Keychains/build.keychain -P "" -A

security list-keychains -s ~/Library/Keychains/build.keychain
security default-keychain -s ~/Library/Keychains/build.keychain
security unlock-keychain -p "" ~/Library/Keychains/build.keychain

security set-key-partition-list -S apple-tool:,apple: -s -k "" ~/Library/Keychains/build.keychain

66 changes: 66 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,69 @@ jobs:

# - name: Test Dcrios
# run: xcodebuild -workspace Decred\ Wallet.xcworkspace -scheme Decred\ Wallet\ Testnet -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12' clean test

- name: Upload Dcrios Folder
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v1
with:
name: Dcrios
path: /Users/runner/work/dcrios/dcrios

deploy:
name: Deploying to Testflight
runs-on: macOS-latest
needs: testing
if: success() && github.ref == 'refs/heads/master'
steps:
- name: Download Dcrios Folder
uses: actions/download-artifact@v1
with:
name: Dcrios

- name: Install gpg
run: brew install gnupg

- name: Setup provisioning profile
env:
IOS_KEYS: ${{ secrets.IOS_KEYS }}
run: |
chmod -R 755 ./
chmod +x ./.github/secrets/decrypt_secrets.sh
./.github/secrets/decrypt_secrets.sh
working-directory: Dcrios

- name: Archiving project
env:
PR_NUMBER: $(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
run: |
chmod +x ./.github/scripts/archive_app.sh
./.github/scripts/archive_app.sh
working-directory: Dcrios

- name: Exporting .ipa
run: |
chmod +x ./.github/scripts/export_ipa.sh
./.github/scripts/export_ipa.sh
working-directory: Dcrios

- name: Upload Testnet IPA
uses: actions/upload-artifact@v1
with:
name: Decred Wallet Testnet (debug ipa)
path: Dcrios/build/Decred\ Wallet\ Testnet.ipa

- name: Publishing app
if: success()
env:
APPLEID_USERNAME: ${{ secrets.APPLEID_USERNAME }}
APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }}
run: |
chmod +x ./.github/scripts/publish_testflight.sh
./.github/scripts/publish_testflight.sh
working-directory: Dcrios

- name: Delete Dcrios Folder
uses: geekyeggo/delete-artifact@v1
with:
name: Dcrios
failOnError: false
25 changes: 25 additions & 0 deletions Decred Wallet/exportOptions.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
<key>com.decred.dcrios.testnet3</key>
<string>b6b99236-cee8-4bab-abc8-1735c701853a</string>
</dict>
<key>signingCertificate</key>
<string>iPhone Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>UX9L95U548</string>
<key>uploadBitcode</key>
<false/>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>
3 changes: 3 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
end
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ SPEC CHECKSUMS:
QRCodeReader.swift: 373a389fe9a22d513c879a32a6f647c58f4ef572
SwiftKeychainWrapper: 807ba1d63c33a7d0613288512399cd1eda1e470c

PODFILE CHECKSUM: 2cbcbe327300b72152a1957cbb4dfd3fa4136777
PODFILE CHECKSUM: 071a1b7b56d23179e1e807ba8d3550ae6b1ca129

COCOAPODS: 1.11.2