-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increment patch version in Chart.yaml file
- Loading branch information
Showing
1 changed file
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,20 @@ jobs: | |
|
||
- name: Bump Patch Version | ||
run: | | ||
yq e '.version |= .+ ".1"' -i charts/libretranslate/Chart.yaml | ||
# Read the current version | ||
version=$(yq e '.version' charts/libretranslate/Chart.yaml) | ||
# Split the version into major, minor, and patch | ||
IFS='.' read -ra VERSION_PARTS <<< "$version" | ||
# Increment the minor version | ||
VERSION_PARTS[2]=$((VERSION_PARTS[2] + 1)) | ||
# Reassemble the version string | ||
new_version="${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.${VERSION_PARTS[2]}" | ||
# Update the version in the Chart.yaml file | ||
yq e ".version = \"$new_version\"" -i charts/libretranslate/Chart.yaml | ||
- name: Commit and Push | ||
run: | | ||
|
@@ -47,5 +60,9 @@ jobs: | |
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
skip_existing: true | ||
mark_as_latest: true | ||
packages_with_index: true | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |