Skip to content

Commit

Permalink
Increment patch version in Chart.yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
drivard committed Dec 15, 2023
1 parent 96bc992 commit 37eb81e
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/helm-chart-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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 }}"

0 comments on commit 37eb81e

Please sign in to comment.