Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Card Templates
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kartenaale
Build
Card Templates
Merge requests
!11
chore: update tag thingy
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
chore: update tag thingy
fix/ci
into
main
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Philipp Pospischil
requested to merge
fix/ci
into
main
10 months ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
1c424b2f
1 commit,
10 months ago
1 file
+
2
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
2
−
1
Options
@@ -40,6 +40,7 @@ release-package-json-version-as-git-tag:
-
if
:
$CI_COMMIT_BRANCH == "main"
# we don't need anything in node_modules or python, so don't fetch the cache
cache
:
[]
resource_group
:
repository
script
:
-
NPM_VERSION=$(grep '"version":' package.json -m 1 | cut -d '"' -f 4)
# || exit_code=$? is the recommended way to ignore a non-zero exit code
@@ -47,7 +48,7 @@ release-package-json-version-as-git-tag:
-
if [ -z "$NPM_VERSION_GIT_TAG" ]; then
-
echo adding git tag for first commit on main with NPM version ${NPM_VERSION}
-
git remote remove origin
-
git remote add origin https://oauth:${REPOSITORY_ACCESS_TOKEN}@gitlab.phaidra.org/
kartenaale/build/card-templates
.git
-
git remote add origin https://oauth:${REPOSITORY_ACCESS_TOKEN}@gitlab.phaidra.org/
$CI_PROJECT_PATH
.git
-
git config user.email Cao Cao
-
git config user.name cao.cao@ci.kartenaale
-
git tag -a $NPM_VERSION -m "Release $NPM_VERSION"
Loading