This repository was archived by the owner on Oct 30, 2023. It is now read-only.
forked from junzhli/AGPMInjector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbitrise.yml
More file actions
92 lines (85 loc) · 3.53 KB
/
bitrise.yml
File metadata and controls
92 lines (85 loc) · 3.53 KB
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: "8"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: macos
app:
envs:
- BITRISE_PROJECT_PATH: AGPMInjector.xcodeproj
opts:
is_expand: false
- BITRISE_SCHEME: AGPMInjector
opts:
is_expand: false
- BITRISE_EXPORT_METHOD: none
opts:
is_expand: false
- BITRISE_EXPORT_FORCE_TEAM_ID: XYZ123456
opts:
is_expand: false
trigger_map:
- push_branch: '*'
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:
title: Do anything with Script step
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/AGPMInjector/Info.plist
# ---- Get Current Bundle Version:
build_version="$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $BITRISE_SOURCE_DIR/AGPMInjector/Info.plist)"
short_bundle_version=`sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $BITRISE_SOURCE_DIR/AGPMInjector.xcodeproj/project.pbxproj`
CONFIG_build_version=${build_version}
CONFIG_short_bundle_version=${short_bundle_version}
echo $build_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}"
- set-xcode-build-number:
inputs:
- build_version: $CURRENT_SHORT_BUNDLE_VERSION
- plist_path: $BITRISE_SOURCE_DIR/AGPMInjector/Info.plist
- xcode-archive-mac:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- scheme: $BITRISE_SCHEME
- export_method: $BITRISE_EXPORT_METHOD
# - force_team_id: $BITRISE_EXPORT_FORCE_TEAM_ID
- force_code_sign_identity: ""
# - custom_export_options_plist_content: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>method</key>\n\t<string>development</string>\n\t<key>teamID</key>\n\t<string>XYZ123456</string>\n</dict>\n</plist>"
# - script:
# inputs:
# - content: |+
# #!/bin/bash
# # ---- Remove DsYM file:
# rm -rf $BITRISE_DSYM_PATH
# # ---- Generate Sparkle appacast.xml:
# $BITRISE_SOURCE_DIR/Support\ Files/generate_appcast $BITRISE_DEPLOY_DIR
- deploy-to-bitrise-io: {}
- cache-push: {}
- 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/junzhli/AGPMInjector.git
- commit: master
- api_token: $GIT_ACCESS_TOKEN