Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
org.benoitharrault.puzzlegame
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
android
org.benoitharrault.puzzlegame
Commits
a93ab805
Commit
a93ab805
authored
3 years ago
by
Benoît Harrault
Browse files
Options
Downloads
Patches
Plain Diff
Improve CI/CD, fix release, skip jobs
parent
499393f0
No related branches found
No related tags found
1 merge request
!30
Resolve "Improve CI/CD, fix release, skip jobs"
Pipeline
#1518
passed
3 years ago
Stage: update
Stage: build-debug
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+21
-6
21 additions, 6 deletions
.gitlab-ci.yml
android/gradle.properties
+2
-2
2 additions, 2 deletions
android/gradle.properties
with
23 additions
and
8 deletions
.gitlab-ci.yml
+
21
−
6
View file @
a93ab805
...
@@ -63,9 +63,19 @@ android:build-release:
...
@@ -63,9 +63,19 @@ android:build-release:
-
echo keyAlias=$ANDROID_KEY_ALIAS >> android/key.properties
-
echo keyAlias=$ANDROID_KEY_ALIAS >> android/key.properties
-
echo keyPassword=$ANDROID_KEY_PASSWORD >> android/key.properties
-
echo keyPassword=$ANDROID_KEY_PASSWORD >> android/key.properties
# build flutter app
# build flutter app
-
flutter packages get
-
VERSION_FILE="$(find . -name 'gradle.properties' | head -n1)"
-
flutter clean
-
VERSION_NAME="$(grep '^app.versionName=' "${VERSION_FILE}" | cut -d'=' -f2)"
-
flutter build apk --release
-
VERSION_CODE="$(grep '^app.versionCode=' "${VERSION_FILE}" | cut -d'=' -f2)"
-
TAG_NAME="Release_${VERSION_NAME}_${VERSION_CODE}"
-
echo "${TAG_NAME}"
-
>
if [ $(git tag -l "${TAG_NAME}") ]; then
echo "Tag ${TAG_NAME} already exists. Skipping build release."
else
flutter packages get
flutter clean
flutter build apk --release
fi
# prepare artifact
# prepare artifact
-
find . -name "*.apk"
# where is my apk?
-
find . -name "*.apk"
# where is my apk?
artifacts
:
artifacts
:
...
@@ -94,8 +104,13 @@ application:release:
...
@@ -94,8 +104,13 @@ application:release:
-
VERSION_CODE="$(grep '^app.versionCode=' "${VERSION_FILE}" | cut -d'=' -f2)"
-
VERSION_CODE="$(grep '^app.versionCode=' "${VERSION_FILE}" | cut -d'=' -f2)"
-
TAG_NAME="Release_${VERSION_NAME}_${VERSION_CODE}"
-
TAG_NAME="Release_${VERSION_NAME}_${VERSION_CODE}"
-
echo "${TAG_NAME}"
-
echo "${TAG_NAME}"
-
git tag -a "${TAG_NAME}" -m "Release ${VERSION_NAME} (${VERSION_CODE})"
-
>
-
git push origin "${TAG_NAME}"
if [ $(git tag -l "${TAG_NAME}") ]; then
echo "Tag ${TAG_NAME} already exists. Skipping release and tag creation."
else
git tag -a "${TAG_NAME}" -m "Release ${VERSION_NAME} (${VERSION_CODE})"
git push origin "${TAG_NAME}"
fi
android:deploy
:
android:deploy
:
stage
:
deploy
stage
:
deploy
...
@@ -104,4 +119,4 @@ android:deploy:
...
@@ -104,4 +119,4 @@ android:deploy:
dependencies
:
dependencies
:
-
application:release
-
application:release
script
:
script
:
-
wget
${REPOSITORY_UPDATE_WEBHOOK}?token=${REPOSITORY_TOKEN}
-
curl "
${REPOSITORY_UPDATE_WEBHOOK}?token=${REPOSITORY_TOKEN}
"
This diff is collapsed.
Click to expand it.
android/gradle.properties
+
2
−
2
View file @
a93ab805
org.gradle.jvmargs
=
-Xmx1536M
org.gradle.jvmargs
=
-Xmx1536M
android.useAndroidX
=
true
android.useAndroidX
=
true
android.enableJetifier
=
true
android.enableJetifier
=
true
app.versionName
=
0.0.2
8
app.versionName
=
0.0.2
9
app.versionCode
=
2
8
app.versionCode
=
2
9
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