Release Charts #1
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: Release Charts | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Update Helm Chart Version | |
working-directory: Charts/ldtteam-authentication-server | |
run: | | |
# The current version is stored in github.ref_name, we need to rewrite the charts.yaml file with the new version | |
# However we can only replace the version: property if it is at the start of a line | |
echo "Updating Chart.yaml version to ${{ github.ref_name }}" | |
sed -i "s/^version: \(.*\)/version: ${{ github.ref_name }}/g" Chart.yaml | |
# Now this inserted a version with a v prefix, we need to remove only that initial v | |
sed -i "1s/version: v\(.*\)/version: \1/g" Chart.yaml | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
with: | |
charts_dir: 'Charts' | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |