-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathcreate-release.yml
93 lines (93 loc) · 3.58 KB
/
create-release.yml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
trigger:
branches:
include:
- master
- dev
- refs/tags/*
jobs:
- job: build_all_mac
displayName: Build all tasks (macos)
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
pool:
vmImage: 'macos-latest'
steps:
- task: UseNode@1
inputs:
checkLatest: true
- task: Npm@1
inputs:
command: 'install'
workingDir: 'web/ReactNativeBingo'
- task: ReactNativePrepare@0
inputs:
platform: 'android'
reactGradle: 'web/ReactNativeBingo/android/app/build.gradle'
cwd: 'web/ReactNativeBingo'
- task: ReactNativePrepare@0
inputs:
platform: 'ios'
xcodeProject: 'web/ReactNativeBingo/ios/ReactNativeBingo.xcodeproj/project.pbxproj'
cwd: 'web/ReactNativeBingo'
- script: cd web/ReactNativeBingo && npm install
displayName: 'run npm install'
- script: cd web/ReactNativeBingo && node_modules/.bin/rn-nodeify --install 'crypto,buffer,react-native-randombytes,vm,stream,http,https,os,url,net,fs,screen,react-native-gesture-handler' --hack
displayName: 'Install dependencies'
- script: cd web/ReactNativeBingo && npm install react-native-gesture-handler --save && npm install react-native-reanimated --save
displayName: 'Install react-native module'
- task: Gradle@2
displayName: 'build apk with Gradle'
inputs:
gradleWrapperFile: 'web/ReactNativeBingo/android/gradlew'
workingDirectory: 'web/ReactNativeBingo/android/app'
tasks: 'assembleRelease'
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
sonarQubeRunAnalysis: false
continueOnError: false
- script: cd web/ReactNativeBingo && npm run build:ios
displayName: 'npm run build:ios'
- task: InstallAppleCertificate@2
displayName: 'InstallAppleCertificate'
inputs:
certSecureFile: '$(p12FileName)'
certPwd: '$(P12Password)'
- task: InstallAppleProvisioningProfile@1
displayName: 'InstallAppleProvisioningProfile'
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: '$(provisioningProfile)'
- task: Xcode@5
displayName: 'build ipa with Xcode'
inputs:
actions: 'clean build'
configuration: 'Release'
sdk: 'iphoneos'
xcWorkspacePath: 'web/ReactNativeBingo/ios/*.xcodeproj/project.xcworkspace'
scheme: 'ReactNativeBingo'
packageApp: true
archivePath: 'web/ReactNativeBingo/ios/dist'
exportPath: 'web/ReactNativeBingo/ios/dist'
signingOption: 'manual'
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
destinationPlatformOption: 'iOS'
destinationSimulators: 'iPhone 8'
workingDirectory: 'web/ReactNativeBingo/ios/ReactNativeBingo.xcodeproj'
- script: cd web/ReactNativeBingo/ios/dist && mv ReactNativeBingo.ipa app-release.ipa
- script: set tagname && export tag_Name=`git tag --sort=-creatordate | head -1` && echo '##vso[task.setvariable variable=tagname;]'$tag_Name
displayName: 'set tagname'
- task: GitHubRelease@1
displayName: 'create release'
inputs:
gitHubConnection: 'github.com_rosona'
repositoryName: 'AElfProject/aelf-boilerplate'
action: 'edit'
target: '$(Build.SourceVersion)'
tag: '$(tagname)'
releaseNotesSource: 'inline'
assets: |
web/ReactNativeBingo/android/app/build/outputs/apk/release/app-release.apk
web/ReactNativeBingo/ios/dist/app-release.ipa
assetUploadMode: 'replace'
isPreRelease: true
addChangeLog: false