-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (60 loc) · 3.28 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# - name: Decrypt Secrets
# run: ./secrets/decrypt_secrets.sh
# env:
# DECRYPT_KEY: ${{ secrets.DECRYPT_KEY }}
# - name: Setup iOS Certificates
# uses: apple-actions/import-codesign-certs@v1
# with:
# p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
# p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
# keychain: github-actions-xamarin
# keychain-password: ''
# - name: Setup iOS Provisioning Profiles
# uses: apple-actions/download-provisioning-profiles@v1
# with:
# bundle-id: 'dev.sbyte.github-actions-xamarin'
# profile-type: 'IOS_APP_ADHOC'
# issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
# api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
# api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
- name: Setup Android signing
run: |
echo "${{ secrets.KEYSTORE }}" > icebeamkeystore.asc
gpg -d --passphrase "${{ secrets.DECRYPT_KEY }}" --batch icebeamkeystore.asc > ./PDFDemo/PDFDemo.Android/icebeamkeystore.jks
# run: (echo ${{ secrets.KEYSTORE }} | base64 --decode) > ./PDFDemo.Android/icebeamkeystore.keystore.asc
# - name: Set iOS version
# run: |
# /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${{ secrets.APP_VERSION }}" ./PDFDemo.iOS/Info.plist
# /usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${{ github.run_number }}" ./PDFDemo.iOS/Info.plist
- name: Set Android version
uses: damienaicheh/[email protected]
with:
android-manifest-path: ./PDFDemo/PDFDemo.Android/Properties/AndroidManifest.xml
version-name: ${{ secrets.APP_VERSION }}
version-code: ${{ github.run_number }}
print-file: true
- name: Restore NuGet packages
run: nuget restore
# - name: Build iOS
# run: MSBuild /t:Build /p:Configuration=Release /p:Platform=iPhone /p:BuildIpa=true ./PDFDemo.iOS/PDFDemo.iOS.csproj
- name: Build Android
run: MSBuild /t:SignAndroidPackage /p:Configuration=Release /p:AndroidPackageFormat=apk /p:AndroidKeyStore=true /p:AndroidSigningKeyAlias=icebeamkeystore /p:AndroidSigningKeyPass=${{ secrets.DECRYPT_KEY }} /p:AndroidSigningKeyStore=icebeamkeystore.jks /p:AndroidSigningStorePass=${{ secrets.DECRYPT_KEY }} ./PDFDemo/PDFDemo.Android/PDFDemo.Android.csproj
- name: Setup App Center CLI
run: npm install -g appcenter-cli
# - name: Upload iOS app to App Center
# run: appcenter distribute release --silent --file ./PDFDemo/PDFDemo.iOS/bin/iPhone/Release/PDFDemo.iOS.ipa --app SByteDev/PDFDemo.Xamarin-iOS --group Collaborators --token ${{ secrets.APP_CENTER_TOKEN }}
- name: Upload Android app to App Center
run: appcenter distribute release --silent --file ./PDFDemo/PDFDemo/PDFDemo/PDFDemo.Android/bin/Release/com.luisbeltran.icebeamkeystore-Signed.apk --app icebeam/PDFDemo.Xamarin-Android --group Collaborators --token ${{ secrets.APP_CENTER_TOKEN }}