Skip to content

chore(main): release flagsmith 0.77.2 (#424) #187

chore(main): release flagsmith 0.77.2 (#424)

chore(main): release flagsmith 0.77.2 (#424) #187

Workflow file for this run

name: Release Charts
on:
push:
tags:
- flagsmith-*.*.*
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.5.4
- name: Add chart repo dependencies
# Note: this repos should match with the repos set in ct.yaml
# See https://github.com/Flagsmith/flagsmith-charts/issues/105
run: |
helm repo add stable https://charts.helm.sh/stable
helm repo add influxdb2 https://helm.influxdata.com/
helm repo add kiwigrid https://kiwigrid.github.io
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Set up chart-testing
uses: helm/[email protected]
with:
version: v3.3.0
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml --lint-conf lintconf.yaml
# The following steps replace those originally handled by helm.chart-releaser-action
# Now that release-please is handling the generation of the release and tag, we just need
# to build the charts, upload them to the release created by release-please, and then
# update the gh-pages branch to update the helm repo.
- name: Build chart
run: |
mkdir -p .cr-release-packages
helm dependency update charts/flagsmith
helm package charts/flagsmith --destination .cr-release-packages
- name: Upload chart to GitHub Release
uses: softprops/action-gh-release@v1
with:
files: .cr-release-packages/*.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update GitHub Pages index
run: |
git fetch origin gh-pages
git worktree add gh-pages origin/gh-pages
cp .cr-release-packages/*.tgz gh-pages/
helm repo index gh-pages \
--merge gh-pages/index.yaml \
--url "https://github.com/Flagsmith/flagsmith-charts/releases/download/$GITHUB_REF_NAME"
cd gh-pages
git config user.name "flagsmithdev"
git config user.email "[email protected]"
git add index.yaml
git commit -m "Add Helm chart for $GITHUB_REF_NAME"
git push origin HEAD:gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}