Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flutter-toolbox
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
flutter-toolbox
Commits
55aa1496
Commit
55aa1496
authored
4 months ago
by
Benoît Harrault
Browse files
Options
Downloads
Plain Diff
Merge branch '27-split-tag-and-publish-ci-cd-steps' into 'master'
Resolve "Split tag and publish CI/CD steps" Closes
#27
See merge request
!23
parents
512d0905
d1871ccb
No related branches found
No related tags found
1 merge request
!23
Resolve "Split tag and publish CI/CD steps"
Pipeline
#7608
passed
4 months ago
Stage: publish-check
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+33
-12
33 additions, 12 deletions
.gitlab-ci.yml
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
pubspec.yaml
+1
-1
1 addition, 1 deletion
pubspec.yaml
with
38 additions
and
13 deletions
.gitlab-ci.yml
+
33
−
12
View file @
55aa1496
image
:
ghcr.io/cirruslabs/flutter:latest
stages
:
-
build-debug
-
release
-
publish-check
-
release-tag
-
release-publish
android:build-debug
:
stage
:
build-debug
# Check flutter package
package:publish-check
:
stage
:
publish-check
except
:
-
tags
-
master
script
:
# Check flutter package
-
VERSION_NAME="$(grep '^version:' pubspec.yaml | cut -d' ' -f2)"
-
echo "${VERSION_NAME}"
-
TAG_NAME="${VERSION_NAME}"
...
...
@@ -24,15 +25,20 @@ android:build-debug:
-
flutter pub publish --dry-run
interruptible
:
true
application:release
:
stage
:
release
# Create git tag on new release
package:release-tag
:
stage
:
release-tag
image
:
name
:
alpine/git
entrypoint
:
[
"
"
]
only
:
-
master
except
:
-
tags
dependencies
:
-
android:build-debug
-
package:publish-check
script
:
-
apk --no-cache add curl
-
git config user.email "${GITLAB_USER_EMAIL}"
-
git config user.name "${GITLAB_USER_NAME}"
-
git remote set-url origin https://oauth2:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}
...
...
@@ -46,9 +52,24 @@ application:release:
else
git tag -a "${TAG_NAME}" -m "Release ${VERSION_NAME}"
git push origin "${TAG_NAME}"
flutter clean
flutter packages get
echo "${PRIVATE_PACKAGES_REPOSITORY_KEY}" | flutter pub token add https://pub.harrault.fr
flutter pub publish --force
curl --silent -d "{\"token\": \"${JABBER_NOTIFICATION_TOKEN}\", \"message\": \"New tag for ${CI_PROJECT_PATH}: ${TAG_NAME}\"}" -H "Content-Type: application/json" -X POST ${JABBER_NOTIFICATION_URL}
fi
# Publish package to private repository
package:release-publish
:
stage
:
release-publish
only
:
-
master
except
:
-
tags
dependencies
:
-
package:release-tag
script
:
-
echo "${PRIVATE_PACKAGES_REPOSITORY_KEY}" | flutter pub token add https://pub.harrault.fr
-
VERSION_NAME="$(grep '^version:' pubspec.yaml | cut -d' ' -f2)"
-
echo "${VERSION_NAME}"
-
flutter clean
-
flutter packages get
-
flutter pub publish --force
-
>
curl --silent -d "{\"token\": \"${JABBER_NOTIFICATION_TOKEN}\", \"message\": \"New package published for ${CI_PROJECT_PATH}: ${VERSION_NAME}\"}" -H "Content-Type: application/json" -X POST ${JABBER_NOTIFICATION_URL}
This diff is collapsed.
Click to expand it.
CHANGELOG.md
+
4
−
0
View file @
55aa1496
## 1.0.3
-
Split tag and publish CI/CD steps, minor CI/CD improvements
## 1.0.2
-
Fix publish to private repository
...
...
This diff is collapsed.
Click to expand it.
pubspec.yaml
+
1
−
1
View file @
55aa1496
...
...
@@ -3,7 +3,7 @@ description: "Flutter custom toolbox for org.benoitharrault.* projects."
publish_to
:
https://pub.harrault.fr/
version
:
1.0.
2
version
:
1.0.
3
homepage
:
https://git.harrault.fr/android/flutter-toolbox
...
...
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