Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Update release-helm.yaml #61

Update release-helm.yaml

Update release-helm.yaml #61

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
generate-version:
name: "Generate version"
runs-on: ubuntu-latest
outputs:
version: ${{ steps.out.outputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '17'
java-package: jdk
- id: pr
uses: actions-ecosystem/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Match semver label via bash
id: match-label-bash
run: |
LABELS=$(cat <<-END
${{ steps.pr.outputs.labels }}
END
)
echo "Outputs"
echo "${{ steps.pr.outputs.title }}"
echo "Run with labels"
echo "$LABELS"
IFS='\n' read -ra LABEL <<< "$LABELS"
for i in "${LABEL[@]}"; do
echo $i
case $i in
# Will just use the first occurence
'major'|'minor'|'patch')
echo "::set-output name=release-label::$i"
break
esac
done
- uses: zwaldowski/semver-release-action@v2
with:
dry_run: true
bump: ${{ steps.match-label-bash.outputs.release-label }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Set version output
id: out
run: echo "::set-output name=version::$(echo ${VERSION})"
deploy:
name: "Release charts"
needs:
- "generate-version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch history
run: git fetch --prune --unshallow
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
run: |
curl -fsSLo get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: true
git-release:
name: "Create Git Release"
needs: ["generate-version", "deploy"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ needs.generate-version.outputs.version }}
prerelease: false
title: ${{ needs.generate-version.outputs.version }}
files: |
LICENSE