Skip to content

Commit

Permalink
Reorganize scripts so that chart version is updated on release
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasovskib committed Jan 16, 2025
1 parent c355ca5 commit d632a1b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/bump_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@

# Auto bump version patch.
match = re.search(r'version:\s*(.+)', chart_yaml)

if match:
current_version = match.group(1)
print(f'Current version: {current_version}')

updated_yaml = updated_yaml.replace(current_version, new_chart_version)
print(f'Updated version: {new_chart_version}')

else:
raise 'version field not found in Chart.yaml'

with open(chart_yaml_path, 'w') as chart_file:
chart_file.write(updated_yaml)
4 changes: 4 additions & 0 deletions .github/workflows/publish-chart-in-cast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get release tag
if: github.event_name == 'release'
run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Checkout helm-charts
if: ${{ github.event_name == 'release' }}
# The cr tool only works if the target repository is already checked out
Expand Down
31 changes: 16 additions & 15 deletions charts/temporal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ apiVersion: v2
name: temporal
description: Temporal is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
home: https://temporal.io/
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 1.2.3
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.26.2
keywords:
- temporal
- workflow
Expand All @@ -28,18 +43,4 @@ dependencies:
repository: https://grafana.github.io/helm-charts
version: 8.0.2
condition: grafana.enabled
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.54.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.26.2

0 comments on commit d632a1b

Please sign in to comment.