Skip to content

Updated sample MQTT to 8885 (#57) #10

Updated sample MQTT to 8885 (#57)

Updated sample MQTT to 8885 (#57) #10

name: Release HiveMQ Platform Chart
on:
push:
branches: [master]
paths:
- charts/hivemq-platform/**
workflow_dispatch:
env:
PLATFORM_CHART_PATH: charts/hivemq-platform
jobs:
release-charts:
permissions:
contents: write # to push chart release and create a release (helm/chart-releaser-action)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- 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: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.12.0
- name: Add dependency chart repos
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- name: Run chart-releaser
id: chart-releaser
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
mark_as_latest: false
generate-release-notes:
runs-on: ubuntu-latest
needs: release-charts
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
fetch-depth: 0
- name: Fetch latest and previous tags
id: fetch-latest-previous-tags
run: |
set -x
# Fetch latest and previous tag
tags=($(git tag --list "hivemq-platform-[0-9]*.[0-9]*.[0-9]*" | sort -r | head -n 2))
echo "latest_tag=${tags[0]}" >> "$GITHUB_OUTPUT"
echo "previous_tag=${tags[1]}" >> "$GITHUB_OUTPUT"
- name: Generate release notes
id: generate-release-notes
uses: mikepenz/[email protected]
with:
ignorePreReleases: true
fromTag: ${{ steps.fetch-latest-previous-tags.outputs.latest_tag }}
path: ${{ env.PLATFORM_CHART_PATH }}
outputFile: RELEASE_NOTES.md
env:
GH_TOKEN: ${{ github.token }}
- name: Update release notes
env:
GH_TOKEN: ${{ github.token }}
run: |
set -x
latest_tag="${{ steps.fetch-latest-previous-tags.outputs.latest_tag }}"
gh release edit ${latest_tag} --notes-file ${{ env.PLATFORM_CHART_PATH }}/RELEASE_NOTES.md