# This workflow publishes a new chart release to github pages # The content of the branch gh-pages is then published to https://puzzle.github.io/cert-manager-webhook-dnsimple/ name: Release a new chart version on: workflow_dispatch: jobs: release: permissions: contents: write runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 # fetch-tags: true - from experience, this usually results in errors # > Also see: https://github.com/actions/checkout/issues/1467 - name: Configure Git run: | git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: Run chart-releaser uses: helm/chart-releaser-action@v1.7.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" with: charts_dir: ./charts - name: Add commit digest to GH release run: | git fetch --tags LAST_TAG=$(git tag --list 'cert-manager-webhook-dnsimple*' --sort=-v:refname | sed -n '2p') CURRENT_TAG=$(git tag --list 'cert-manager-webhook-dnsimple*' --sort=-v:refname | sed -n '1p') COMMITS=$(git log ${LAST_TAG}..${CURRENT_TAG} --oneline | sed 's/^/- /') # Workaround to get newlines working echo -e "### Changes since \`${LAST_TAG}\`\n\n${COMMITS}" > msg gh release edit ${CURRENT_TAG} --notes "$(cat msg)" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}