Skip to content

Update release workflow #11

Update release workflow

Update release workflow #11

Workflow file for this run

name: Prepare draft release
on:
push:
tags:
- v*.*.*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.14.4
- name: Package Helm charts
run: |
for chart in $(ls charts); do
helm package charts/$chart
done
- name: Save generated charts
run: |
mkdir -p /tmp/charts
cp *.tgz /tmp/charts
- name: Release
id: release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: ${{ contains(github.ref, 'rc') }}
target_commitish: ${{ github.sha }}
files: |
*.tgz
generate_release_notes: true
- name: Checkout to branch gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
fetch-depth: 0
- name: Copy generated charts
run: |
cp /tmp/charts/*.tgz .
- name: Update Helm charts repo index
env:
CHART_URL: https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}
run: |
helm repo index --merge index.yaml --url $CHART_URL .
git add index.yaml
git commit -s -m "Update index.yaml" || exit 0
git push