Update release workflow #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create release | |
on: | |
push: | |
tags: | |
- v*.*.* | |
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: Release | |
id: release | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: ${{ contains(github.ref, 'rc') }} | |
target_commitish: ${{ github.sha }} | |
files: | | |
spark-operator-v*.*.*.tgz | |
generate_release_notes: true | |
- name: Checkout to branch gh-pages | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
fetch-depth: 0 | |
- 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 |