feat: 🚀 release chart v3.2.0 (#126) #40
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: | |
push: | |
branches: | |
- master | |
env: | |
tag_prefix: v | |
jobs: | |
test: | |
uses: "./.github/workflows/test.yaml" | |
release: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
git config --global --add safe.directory /charts | |
- name: Copy LICENSE and README.md for packaging | |
run: | | |
cp ./README.md ./traefikee/README.md | |
cp ./LICENSE ./traefikee/LICENSE | |
- name: Get chart version | |
id: chart_version | |
run: | | |
echo "CHART_VERSION=$(cat traefikee/Chart.yaml | awk -F"[ ',]+" '/version:/{print $2}')" >> $GITHUB_OUTPUT | |
- name: Check if tag exists | |
id: tag_exists | |
run: | | |
TAG_EXISTS=true | |
if ! [ $(git tag -l "${{ env.tag_prefix }}${{ steps.chart_version.outputs.CHART_VERSION }}") ]; then | |
TAG_EXISTS=false | |
fi | |
echo TAG_EXISTS=$TAG_EXISTS >> $GITHUB_OUTPUT | |
- name: Tag release | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
custom_tag: ${{ steps.chart_version.outputs.CHART_VERSION }} | |
tag_prefix: ${{ env.tag_prefix }} | |
if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: ${{ steps.tag_version.outputs.new_tag }} | |
body: ${{ steps.tag_version.outputs.changelog }} | |
prerelease: ${{ contains(steps.chart_version.outputs.CHART_VERSION, '-') }} | |
if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | |
- name: Publish Helm chart | |
uses: stefanprodan/helm-gh-pages@master | |
with: | |
token: ${{ secrets.CHARTS_TOKEN }} | |
charts_dir: . | |
charts_url: https://traefik.github.io/charts | |
owner: traefik | |
repository: charts | |
branch: master | |
target_dir: traefikee | |
index_dir: . | |
commit_username: traefiker | |
commit_email: [email protected] | |
if: steps.tag_exists.outputs.TAG_EXISTS == 'false' |