Merge branch 'krille/add-candidate-pipeline' into 'main'

CI: Add candidate release pipeline

See merge request famedly/fluffychat!605
This commit is contained in:
Krille Fear 2021-12-05 08:33:12 +00:00
commit 6406955462
5 changed files with 18 additions and 4 deletions

View File

@ -221,7 +221,9 @@ update-dependencies:
image: curlimages/curl:latest image: curlimages/curl:latest
rules: rules:
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/' - if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/'
- if: '$CI_COMMIT_TAG =~ /^rc\d+\.\d+\.\d+$/'
before_script: 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 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}" - 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}") upload_to_play_store(track: 'internal', aab: '../build/app/outputs/bundle/release/app-release.aab', version_code: "#{last_version+1}")
end 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 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
end end

View File

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

View File

@ -1,5 +1,9 @@
#!/bin/sh -ve #!/bin/sh -ve
echo $SNAPCRAFT_LOGIN_FILE | snapcraft login --with - echo $SNAPCRAFT_LOGIN_FILE | snapcraft login --with -
snapcraft 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 snapcraft logout

View File

@ -1,4 +1,8 @@
#!/bin/sh -ve #!/bin/sh -ve
cd android 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 .. cd ..