This repository has been archived by the owner on Apr 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
bitrise.yml
92 lines (86 loc) · 3.21 KB
/
bitrise.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
format_version: "7"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: macos
app:
envs:
- BITRISE_PROJECT_PATH: OCBuilder.xcodeproj
opts:
is_expand: false
- BITRISE_SCHEME: OCBuilder
opts:
is_expand: false
- BITRISE_EXPORT_METHOD: development
opts:
is_expand: false
trigger_map:
- push_branch: master
workflow: primary
- pull_request_source_branch: '*'
workflow: primary
workflows:
primary:
steps:
- activate-ssh-key:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone: {}
- cache-pull: {}
- certificate-and-profile-installer: {}
- script:
inputs:
- content: |-
#!/bin/bash
# ---- Generate Sparkle EdDSA key:
APPCAST_KEY=$($BITRISE_SOURCE_DIR/Support_Files/generate_keys -p)
# ---- Set the SUPublicEDKey to the generated EdDSA key:
/usr/libexec/PlistBuddy -c "Set SUPublicEDKey $APPCAST_KEY" $BITRISE_SOURCE_DIR/OCBuilder/Info.plist
# ---- Get Current Bundle Version:
build_version="$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $BITRISE_SOURCE_DIR/OCBuilder/Info.plist)"
short_bundle_version=`sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $BITRISE_SOURCE_DIR/OCBuilder.xcodeproj/project.pbxproj`
CONFIG_build_version=${build_version}
CONFIG_short_bundle_version=${short_bundle_version}
# ---- Set Build And Bundle Version ENV:
envman add --key "CURRENT_BUILD_VERSION" --value "${CONFIG_build_version}"
envman add --key "CURRENT_SHORT_BUNDLE_VERSION" --value "${CONFIG_short_bundle_version}"
outputs:
- CURRENT_BUILD_VERSION: CURRENT_BUILD_VERSION
opts: {}
- CURRENT_SHORT_BUNDLE_VERSION: CURRENT_SHORT_BUNDLE_VERSION
opts: {}
- set-xcode-build-number:
inputs:
- build_short_version_string: ""
- build_version: $CURRENT_SHORT_BUNDLE_VERSION
- plist_path: $BITRISE_SOURCE_DIR/OCBuilder/Info.plist
- xcode-archive-mac:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- scheme: $BITRISE_SCHEME
- script:
inputs:
- content: |
#!/bin/bash
# ---- Remove Sparkle_generate_appcast cache:
rm -rf $BITRISE_DEPLOY_DIR/*.dSYM.zip
rm -rf $BITRISE_DEPLOY_DIR/export_options.plist
# ---- Generate Sparkle appacast.xml:
$BITRISE_SOURCE_DIR/Support_Files/generate_appcast $BITRISE_DEPLOY_DIR
- deploy-to-bitrise-io: {}
- cache-push:
inputs:
- compress_archive: "true"
- generate-changelog:
inputs:
- new_version: 'new_version: $BITRISE_GIT_TAG'
- github-release:
inputs:
- username: $GITHUB_USER
- tag: $CURRENT_SHORT_BUNDLE_VERSION
- name: $CURRENT_SHORT_BUNDLE_VERSION
- body: $BITRISE_CHANGELOG
- files_to_upload: |-
$BITRISE_EXPORTED_FILE_PATH
$BITRISE_DEPLOY_DIR/appcast.xml
- repository_url: https://github.com/Pavo-IM/ocbuilder.git
- commit: master
- draft: "no"
- api_token: $GIT_ACCESS_TOKEN