CI: Add candidate release pipeline

This commit is contained in:
Krille Fear 2021-12-05 09:13:23 +01:00
parent 16bafcb617
commit 17dc6ed185
5 changed files with 18 additions and 4 deletions

View File

@ -221,7 +221,9 @@ update-dependencies:
image: curlimages/curl:latest
rules:
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/'
- if: '$CI_COMMIT_TAG =~ /^rc\d+\.\d+\.\d+$/'
before_script:
- export RELEASE_TYPE=$(echo $CI_COMMIT_TAG | grep -oE "[a-z]+")
- export RELEASE_VERSION=$(echo $CI_COMMIT_TAG | grep -oE "\d+\.\d+\.\d+")
- export PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/fluffychat/${RELEASE_VERSION}"

View File

@ -44,7 +44,11 @@ platform :android do
upload_to_play_store(track: 'internal', aab: '../build/app/outputs/bundle/release/app-release.aab', version_code: "#{last_version+1}")
end
lane :deploy_candidate do
upload_to_play_store(track: 'internal', track_promote_to: "beta", deactivate_on_promote: false, skip_upload_changelogs: true)
end
lane :deploy_release do
upload_to_play_store(track: 'internal', track_promote_to: "production", deactivate_on_promote: false, skip_upload_changelogs: true)
upload_to_play_store(track: 'beta', track_promote_to: "production", deactivate_on_promote: false, skip_upload_changelogs: true)
end
end

View File

@ -27,7 +27,7 @@ platform :ios do
version_name = config.match(re).captures[0]
increment_version_number(version_number: version_name)
build_app(workspace: "Runner.xcworkspace", scheme: "Runner")
upload_to_testflight
upload_to_testflight(distribute_external: true, groups: "FluffyChat Betatest")
end
end

View File

@ -1,5 +1,9 @@
#!/bin/sh -ve
echo $SNAPCRAFT_LOGIN_FILE | snapcraft login --with -
snapcraft
snapcraft upload --release=stable *.snap
if [RELEASE_TYPE = "rc"]; then
snapcraft upload --release=candidate *.snap
else
snapcraft upload --release=stable *.snap
fi
snapcraft logout

View File

@ -1,4 +1,8 @@
#!/bin/sh -ve
cd android
bundle exec fastlane deploy_release
if [RELEASE_TYPE = "rc"]; then
bundle exec fastlane deploy_candidate
else
bundle exec fastlane deploy_release
fi
cd ..