Skip to content

Release 1.14.0

Release 1.14.0 #27

Workflow file for this run

name: Release Charts on Merge
on:
pull_request:
types: [closed]
branches:
- main
jobs:
release-on-merge:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Installer jq
run: sudo apt-get install jq
- name: Check 'release' Label
id: check_release_label
run: |
labels='${{ toJSON(github.event.pull_request.labels) }}'
echo "Labels de la PR : $labels"
if echo "$labels" | jq -e '.[] | select(.name=="release")' > /dev/null; then
echo "has_release_label=true" >> $GITHUB_ENV
else
echo "has_release_label=false" >> $GITHUB_ENV
fi
- name: Lint Chart - Main chart
if: env.has_release_label == 'true'
run: helm lint .
- name: Update Dependencies
if: env.has_release_label == 'true'
run: helm dependency update .
- name: Deploy to GitHub Pages
if: env.has_release_label == 'true'
run: |
git checkout gh-pages
git pull origin main --rebase
helm package . --destination charts/
helm repo index . --url https://getlago.github.io/charts
git add .
git add charts/
git commit -m "Update Helm repo index after release"
git push origin gh-pages
- name: Extract version from Chart.yaml
if: env.has_release_label == 'true'
id: get_version
run: |
version=$(grep '^version:' Chart.yaml | awk '{print $2}')
echo "Extracted version: $version"
echo "version=$version" >> $GITHUB_ENV
- name: Create Git tag
if: env.has_release_label == 'true'
run: |
git tag "v${{ env.version }}"
git push origin "v${{ env.version }}"
- name: Create GitHub Release
if: env.has_release_label == 'true'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ env.version }}"
release_name: "Release v${{ env.version }}"
body: "Release of version v${{ env.version }}"
draft: false
prerelease: false