Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
circles-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Circles
circles-android
Commits
accd4b41
Commit
accd4b41
authored
1 year ago
by
Taras
Browse files
Options
Downloads
Patches
Plain Diff
Update send script
parent
c1be5e5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+62
-65
62 additions, 65 deletions
.gitlab-ci.yml
with
62 additions
and
65 deletions
.gitlab-ci.yml
+
62
−
65
View file @
accd4b41
...
...
@@ -9,80 +9,77 @@ cache:
-
.gradle/
stages
:
#
- build
#
- release
#
- deploy
-
build
-
release
-
deploy
-
message
#before_script:
# - chmod +x ./gradlew
# - echo -n ${SIGNING_KEY_BASE64} | base64 -d > circuli_key.jks
# - echo "KEY_PATH=../circuli_key.jks" > signing.properties
# - echo "KEY_PASSWORD=${KEY_PASSWORD}" >> signing.properties
# - echo "ALIAS_NAME=${ALIAS_NAME}" >> signing.properties
#
#buildAndPushFdroid:
# image: softartdev/android-fastlane
# stage: build
# script:
# - echo "Building F-Droid apk"
# - ./gradlew clean
# - ./gradlew assembleFdroidRelease
# - apt-get update -qy && apt-get upgrade -qy
# - apt-get install -y git
# - git config --global user.email "taras@futo.org"
# - git config --global user.name "ci-bot"
# - echo "Push build to master"
# - git remote set-url origin https://gitlab-ci-token:${GITLAB_ACCESS_TOKEN}@gitlab.futo.org/circles/circles-android.git
# - git add -f app/build/outputs/apk/fdroid/release/circles-$CI_COMMIT_TAG-fdroid-release.apk
# - git mv app/build/outputs/apk/fdroid/release/circles-$CI_COMMIT_TAG-fdroid-release.apk .
# - git commit -m "Add F-Droid release apk $CI_COMMIT_TAG"
# - git push origin HEAD:main -o ci.skip
# - echo "Push build to fdroid repo"
# - cd ..
# - rm -rf circles-fdroid-repo
# - git clone https://gitlab-ci-token:${FDROID_REPO_GITLAB_ACCESS_TOKEN}@gitlab.futo.org/circles/circles-fdroid-repo.git
# - cp circles-android/circles-$CI_COMMIT_TAG-fdroid-release.apk circles-fdroid-repo/fdroid/repo
# - cd circles-fdroid-repo
# - git add -f fdroid/repo/circles-$CI_COMMIT_TAG-fdroid-release.apk
# - git commit -m "Add F-Droid release apk $CI_COMMIT_TAG"
# - git push origin HEAD:main
before_script
:
-
chmod +x ./gradlew
-
echo -n ${SIGNING_KEY_BASE64} | base64 -d > circuli_key.jks
-
echo "KEY_PATH=../circuli_key.jks" > signing.properties
-
echo "KEY_PASSWORD=${KEY_PASSWORD}" >> signing.properties
-
echo "ALIAS_NAME=${ALIAS_NAME}" >> signing.properties
#createGitlabRelease:
# stage: release
# image: registry.gitlab.com/gitlab-org/release-cli:latest
# script:
# - echo "Running the release job"
# release:
# tag_name: $CI_COMMIT_TAG
# name: 'Version $CI_COMMIT_TAG'
# description: 'Release created using the release-cli.'
# assets:
# links:
# - name: 'F-Droid release apk $CI_COMMIT_TAG'
# url: 'https://gitlab.futo.org/circles/circles-android/-/raw/main/circles-$CI_COMMIT_TAG-fdroid-release.apk?ref_type=heads'
buildAndPushFdroid
:
image
:
softartdev/android-fastlane
stage
:
build
script
:
-
echo "Building F-Droid apk"
-
./gradlew clean
-
./gradlew assembleFdroidRelease
-
apt-get update -qy && apt-get upgrade -qy
-
apt-get install -y git
-
git config --global user.email "taras@futo.org"
-
git config --global user.name "ci-bot"
-
echo "Push build to master"
-
git remote set-url origin https://gitlab-ci-token:${GITLAB_ACCESS_TOKEN}@gitlab.futo.org/circles/circles-android.git
-
git add -f app/build/outputs/apk/fdroid/release/circles-$CI_COMMIT_TAG-fdroid-release.apk
-
git mv app/build/outputs/apk/fdroid/release/circles-$CI_COMMIT_TAG-fdroid-release.apk .
-
git commit -m "Add F-Droid release apk $CI_COMMIT_TAG"
-
git push origin HEAD:main -o ci.skip
-
echo "Push build to fdroid repo"
-
cd ..
-
rm -rf circles-fdroid-repo
-
git clone https://gitlab-ci-token:${FDROID_REPO_GITLAB_ACCESS_TOKEN}@gitlab.futo.org/circles/circles-fdroid-repo.git
-
cp circles-android/circles-$CI_COMMIT_TAG-fdroid-release.apk circles-fdroid-repo/fdroid/repo
-
cd circles-fdroid-repo
-
git add -f fdroid/repo/circles-$CI_COMMIT_TAG-fdroid-release.apk
-
git commit -m "Add F-Droid release apk $CI_COMMIT_TAG"
-
git push origin HEAD:main
createGitlabRelease
:
stage
:
release
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
script
:
-
echo "Running the release job"
release
:
tag_name
:
$CI_COMMIT_TAG
name
:
'
Version
$CI_COMMIT_TAG'
description
:
'
Release
created
using
the
release-cli.'
assets
:
links
:
-
name
:
'
F-Droid
release
apk
$CI_COMMIT_TAG'
url
:
'
https://gitlab.futo.org/circles/circles-android/-/raw/main/circles-$CI_COMMIT_TAG-fdroid-release.apk?ref_type=heads'
#
uploadPlayStoreBeta:
#
image: softartdev/android-fastlane
#
stage: deploy
#
script:
#
- echo "Running the uploadPlayStoreBeta job"
#
- bundle install
#
- echo ${GPLAY_API_KEY_JSON} > google_play_api_key.json
#
- bundle exec fastlane deployGoogle
uploadPlayStoreBeta
:
image
:
softartdev/android-fastlane
stage
:
deploy
script
:
-
echo "Running the uploadPlayStoreBeta job"
-
bundle install
-
echo ${GPLAY_API_KEY_JSON} > google_play_api_key.json
-
bundle exec fastlane deployGoogle
sendZulipMessage
:
stage
:
message
script
:
-
apk update
-
apk add curl
-
curl -X POST https://zulip.futo.org/api/v1/messages \
-u circles-bot@zulip.futo.org:$ZULIP_BOT_KEY \
--data-urlencode type=stream \
--data-urlencode 'to="circles"' \
--data-urlencode topic=Weekly \
--data-urlencode 'content="Circles Android $CI_COMMIT_TAG
Gitlab release - https://gitlab.futo.org/circles/circles-android/-/releases/CI_COMMIT_TAG
Direct apk link - https://gitlab.futo.org/circles/circles-android/-/raw/main/circles-$CI_COMMIT_TAG-fdroid-release.apk?ref_type=heads"'
-
|
MESSAGE="Circles Android ${CI_COMMIT_TAG}
Gitlab release - https://gitlab.futo.org/circles/circles-android/-/releases/${CI_COMMIT_TAG}
Direct apk link - https://gitlab.futo.org/circles/circles-android/-/raw/main/circles-${CI_COMMIT_TAG}-fdroid-release.apk?ref_type=heads"
-
curl -X POST https://zulip.futo.org/api/v1/messages -u circles-bot@zulip.futo.org:$ZULIP_BOT_KEY --data-urlencode type=stream --data-urlencode 'to="circles"' --data-urlencode topic=Weekly -G --data-urlencode "content=$MESSAGE"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment