Skip to content

Merge pull request #106 from ccremer/fix-storage-class #5

Merge pull request #106 from ccremer/fix-storage-class

Merge pull request #106 from ccremer/fix-storage-class #5

Workflow file for this run

name: ChartRelease
on:
push:
tags:
- "chart/[a-z0-9]+-*" # match tags following the 'chart/$chartname-x.y.z'
jobs:
gh-pages:
runs-on: ubuntu-latest
steps:
- name: Download cr
uses: giantswarm/[email protected]
with:
binary: cr
version: "1.4.0"
download_url: https://github.com/helm/chart-releaser/releases/download/v${version}/chart-releaser_${version}_linux_amd64.tar.gz
tarball_binary_path: "${binary}"
smoke_test: "${binary} version"
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: actions/setup-go@v4
with:
go-version-file: charts/go.mod
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Get chart name
run: echo "CHART_NAME=$(echo ${GITHUB_REF##*/} | grep --perl-regexp --only-matching '^([a-zA-Z0-9-]+)(?![0-9.]+)')" >> $GITHUB_ENV
- name: Get chart versions
run: |
echo "CHART_VERSION=$(yq e '.version' charts/${CHART_NAME}/Chart.yaml)" >> $GITHUB_ENV
echo "PREVIOUS_CHART_VERSION=$(git tag --sort=taggerdate --list "chart/${CHART_NAME}-*" | tail -n 2 | head -n 1 | rev | cut -d - -f 1 | rev)" >> $GITHUB_ENV
- name: Prepare changelog config
run: .github/changelog-charts.sh ${CHART_NAME}
- name: Generate additional artifacts
run: make chart-prepare
- name: Package Helm chart
run: |
mkdir -p .cr-index
cr package charts/${CHART_NAME}
cr upload
cr index --push
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CR_OWNER: ${{ github.repository_owner }}
CR_GIT_REPO: ${{ github.event.repository.name }}
- name: Build changelog from PRs with labels
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/configuration.json"
ignorePreReleases: true
outputFile: .github/release-notes.md
fromTag: chart/${{ env.CHART_NAME }}-${{ env.PREVIOUS_CHART_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# there doesn't seem to be any maintained GitHub actions that allow uploading assets after release has been made.
- name: Update release
run: |
gh release edit ${CHART_NAME}-${CHART_VERSION} --notes-file .github/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}